- 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
.env
file on project root. - Configure
.env
parameteres as below / Just rename.env.example
to.env
and 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=3306
Run 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 dev
Go to postman and call the Health API:
http://localhost:3000/health
- Pull the code from Repo.
- Create
.env
file on project root. - Configure
.env
parameteres as below / Just rename.env.example
to.env
and 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=3306
Run below commands on project root terminal:
docker-compose up --build
Run 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:all
Go to postman and call the Health API:
http://localhost:7300/health
https://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.