Library app using reactjs, redux and nodejs
Setup dev environment on Ubuntu 16.04
- nodejs
- npm
Clone project to the workspace
git clone [email protected]:dilruwan/LibraryApp.git
-
Generate client/src/conf.yml by using client/src/conf.yml.dist (conf.yml is gitignored)
-
cd LibraryApp/client
-
npm install
-
npm start
Client is running at http://localhost:8080
-
Create mysql database and update src/config/config.json accordingly
-
Generate server/.env by using server/.env.dist (.env is gitignored)
-
cd LibraryApp/server
-
npm install
-
Run database migrations
- sequelize db:migrate (This will require sequelize is installed globally or use locally https://github.com/sequelize/cli )
- Add test data : Run seeders
There are two seeder files one for adding user account and another one for adding sample books.
Run all seeders
- sequelize db:seed:all
It will generate user account with following credentials
- username = admin
- password = abc123
If you need only specific seeder,
- sequelize db:seed --seed 20180509044400-user_seeder
- sequelize db:seed --seed 20180514035929-books_seeder
Undo seeder
- sequelize db:seed:undo:all OR
- sequelize db:seed:undo --seed 20180509044400-user_seeder
- sequelize db:seed:undo --seed 20180514035929-books_seeder
Server is running at http://localhost:8000
On the browser point out http://localhost:8080
- CSS framework : Bootstrap
- Bundling tool : webpack
- Database: mysql
- ORM tool : Sequelize
- Authentication & authorization : bcrypt & jsonwebtoken