From e07671b609d504667a9468b789acf16090d38a6e Mon Sep 17 00:00:00 2001 From: adhamhaddad Date: Tue, 25 Apr 2023 00:47:11 +0200 Subject: [PATCH] fix changes --- README.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 46 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 52af2d2..851284c 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,9 @@ ## Description -Full Authentication & Authorization using nodejs, bcrypt, jsonwebtoken, pg thats integrate accessToken, refreshToken with advanced way +Full Authentication & Authorization using nodejs, bcrypt, jsonwebtoken, and pg that integrates accessToken, and refresh token in an advanced way + +# ## Dependencies @@ -10,11 +12,19 @@ Full Authentication & Authorization using nodejs, bcrypt, jsonwebtoken, pg t - npm 6.14.8 (LTS) or more recent, Yarn can work but was not tested for this project +# + +## Code Styles + +This project uses `eslint` and `prettier`. all configurations for this project inside `package.json` file. + +# + ## Installation ### Database setup -1. Open postgres terminal with: `psql postgres` +**[1]** Open postgres terminal with: `psql postgres` 1- `CREATE DATABASE authentication;` @@ -24,14 +34,46 @@ Full Authentication & Authorization using nodejs, bcrypt, jsonwebtoken, pg t 4- `GRANT ALL PRIVILEGES ON DATABASE authentication TO admin;` -2. Second to install the node_modules run `npm install` or `yarn`. After installation is done start the api in dev mode with `npm run dev` or `yarn dev`. +**[2]** Second to install the node_modules run `npm install` or `yarn`. After installation is done start the api in dev mode with `npm run dev` or `yarn dev`. ## Unit Tests -No Unit test available now. +Unit test available using Jasmine with this command: `npm run test` + +Available Scripts: + +## Available Scripts + +In the project directory, you can run: + +##### `npm run dev` or `yarn dev` + +Runs the app in the development mode. +The page will reload automatically if you make edits. + +##### `npm run format` or `yarn format` + +Will format by prettier and will also see if any lint errors in the console. + +##### `npm run test` or `yarn test` + +Launches the test runner in the interactive watch mode. +See the section about running tests for more information. + +##### `npm run build` or `yarn build` + +Builds the app for production to the dist folder. +It's format TypeScript to JavaScript + +##### `npm run start` or `yarn start` + +Build and runs the app in the clients mode. +Open to view it in the browser. ## Built With - [Node](https://nodejs.org) - Javascript Runtime - [Express](https://expressjs.com/) - Javascript API Framework - [PostgreSQL](https://www.postgresql.org/) - Open Source Relational Database +- [Jasmine](https://jasmine.github.io/) - Testing library +- [JWT](https://jwt.io/) - JSON Web Token for generates access and refresh tokens