A REST based solution made with Nodejs,Typescript,Express,TypeORM,Passport,Docker,ApiDocs,postgresSQL
- docker 19+
- docker-compose 1.21.0+
- clone the projet from the git repository
$ npm install
- under your project directory execute this command
$ bash ./scripts/script-dev.sh
Docker image will run the project in development enviroment
-
Run node js using nodemon
-
API Docs will be displayed on http://localhost:5000/api/docs
-
pg admin ui will be displayed on http://localhost:5050/
-
pg admin default credentials : (email: [email protected] , password : admin)
-
Now we need to connect to our postgres and in order to do that go to create -> server
-
this form will be displayed so that you can set your server name
-
Now switch to connection tab and enter the infomation below
Note: db credentials (username:postgres,password:postgres)
- the hostname as you can see is an IPV4 adress which could be found using docker command. In order to get the IPV4 adress tape these commands on your terminal
$ docker ps
this will display all the running containers so that you can get the id of the container running postgres image
- Now run:
$ docker inspect pg_containers_ID
- you can see now in the image below that we can get the IPV4 adress in the terminal
- under your project directory execute this command
$ bash ./scripts/script-prod.sh
-Docker will execute a multistage build and run the required images in detached mode for production enviroment
- API Docs will be displayed on http://localhost:5000/api/docs