Skip to content

Restfull webservice that includes a jwt based authentication system

Notifications You must be signed in to change notification settings

Kyouuma/ts-express-jwt-rest-api

 
 

Repository files navigation

JWT-REST api boilerplate

A REST based solution made with Nodejs,Typescript,Express,TypeORM,Passport,Docker,SwaggerUI,postgresSQL

Requirments

  • docker 19+
  • docker-compose 1.21.0+

Installation

  • clone the projet from the git repository
$ npm install

Running in development enviroment

  • under your project directory execute this command
$ docker-compose up --build
  • Docker image will run the project in development enviroment

  • Run node js using nodemon

  • Swagger-ui will be displayed on http://localhost:5000/swagger-ui

  • pg admin ui will be displayed on http://localhost:5050/

  • pg admin default credentials : (email: [email protected] , password : admin)

    Test Image 7

  • Now we need to connect to our postgres and in order to do that go to create -> server

    Test Image 7

  • this form will be displayed so that you can set your server name

    Test Image 7

  • Now switch to connection tab and enter the infomation below

Note: db credentials (username:postgres,password:postgres)

Test Image 7

  • 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

  • Test Image 7

  • finally the dashboard will display your database details Test Image 7

About

Restfull webservice that includes a jwt based authentication system

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 98.9%
  • Dockerfile 1.1%