- Health Check API
- User Managemnt APIs
- List Users
- Create User
- Delete User
- Member Management APIs
- List Members
- Create Member
- Delete Member
- Node JS v17 : Back-End
- MySQL : Database
- Express JS : NodeJs framework
- Sequelize : ORM for NodeJs
- JOI : Validation package
- Pull the code from Repo.
- Create
.envfile on project root. - Configure
.envparameteres as below / Just rename.env.exampleto.envand make the required changes on env values: - Create the new MySQL DB on your machine.
NODE_ENV=development
PORT=3000
APP_KEY=hM2BG1aMEMLJTIDHSMtxc3vgg1pPDae1
DB_HOST=localhsot
DB_NAME=my_tech_database
DB_USERNAME=root
DB_PASSWORD=root
DB_PORT=3306Run below commands on project root terminal:
npm i
npm i -g sequelize-cli
npx sequelize-cli db:migrate
npx sequelize-cli db:seed:all
npm run devGo to postman and call the Health API:
http://localhost:3000/health- Pull the code from Repo.
- Create
.envfile on project root. - Configure
.envparameteres as below / Just rename.env.exampleto.envand make the required changes on env values: - Create the new MySQL DB on your machine.
NODE_ENV=development
PORT=3000
APP_KEY=hM2BG1aMEMLJTIDHSMtxc3vgg1pPDae1
DB_HOST=host.docker.internal
DB_NAME=my_tech_database
DB_USERNAME=root
DB_PASSWORD=root
DB_PORT=3306Run below commands on project root terminal:
docker-compose up --buildRun below commands on second terminal:
docker exec -it my-tech-nodejs npx sequelize-cli db:migrate
docker exec -it my-tech-nodejs npx sequelize-cli db:seed:allGo to postman and call the Health API:
http://localhost:7300/healthhttps://documenter.getpostman.com/view/12797022/UVsPNQ7v
Postman collection is added on code repo. You can import My Tech.postman_collection.json to your postman workspace and test the api.