Skip to content

CitlaliSC/NodeJs-back-end-AP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NodeJs-back-end-API

  1. Clone this repository
git clone https://github.com/CitlaliSC/NodeJs-back-end-AP.git
  1. Install dependencies
npm i
  1. Create a .env file with the following info:
  • SERVER_PORT=3000
  • DB_HOST=localhost
  • DB_PORT=3306
  • DB_USER=admin
  • DB_PASSWORD=pass123
  • DB_NAME=patientsdb
  • DB_CONNECTION_LIMIT=20
  • SERVER_PORT= 5000
  1. Create docker container
docker-compose up -d 

For testing docker and mysql:

docker exec -it mysqlcontainer mysql -uroot -ppass123

To run in dev:

npm run start:dev

Note: If you are running this on Windows, you may need to adapt the following lines in your package.json scripts, as setting environment variables differs from Linux:

"scripts": {
  "start:dev": "NODE_ENV=dev nodemon src/index.js",
  "start:prod": "NODE_ENV=production node src/index.js"
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published