- Make sure NodeJS and MySQL are installed in your PC.
- Create a new
.env
file under the project folder with the following variables:- NODE_ENV=development
- DB_HOST=localhost
- DB_PORT=your_db_port
- DB_PASS=your_db_pass
- DB_USER=your_db_user
- DB_NAME=your_db_name
- DB_NAME_TEST=your_db_name_for_testing
- Create two MySQL databases for development and for testing. Make sure to follow the DB_NAME and DB_NAME_TEST in your .env file.
- Run
npm install
to install the dependencies. - Run
npx sequelize-cli db:migrate
to create tables to the database. - Run
npx sequelize-cli db:seed:all
to insert test user for administrator. - To run the application, run
npm run watch
and open thelocalhost:{port}
on your browser. - To run the unit tests, change the
NODE_ENV
in.env
file totest
and then runnpm test
.
-
Notifications
You must be signed in to change notification settings - Fork 0
jqamaya/code_test_yantrik
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|