GithubHelp home page GithubHelp logo

jiffy-server-cylic's Introduction

starter-express-api

This is the simplest possible nodejs api using express that responds to any request with:

Yo!

project setup:

install node version 18+ npm install add env file npm run db-migrate:run npm run db-seed:run npm run generate-models npm start

Deploy it in 7 seconds:

Deploy to Cyclic

https://dev.to/nedsoft/getting-started-with-sequelize-and-postgres-emp

JWT authentication with refresh token strategy https://dev.to/cyberwolves/jwt-authentication-with-access-tokens-refresh-tokens-in-node-js-5aa9 steps:

  1. create UserToken table and associate it with user (userId,token,createdAt)
  2. create generateToken function(/utls/generateTokens.js) to create tokens ( will return both tokens) and verifyRefreshToken function as service (/utils/verfiyRefreshToken.js)
  3. validation schema functions (/utils/validationSchema.js)
  4. create routes (/routes/auth.js) (/routes/refreshToken.js)
  5. add salt,private key for jwt in env file

so far: created node repo with express and sequelize, setup migrations and seeders along db test created seeder file for creating admin user created migration for adding role in user table created seeders for creating admin user in database JWT authentication with refresh token strategy added cloudinary for file upload and multer for image handling added scripts for model generations

CREATE APIS FOR CATEGORY: Steps:

  1. Create migrations for categories table (done)
  2. Create middleware for authentication and athorization (done)
  3. Create endpoints for create(done)/get(done)/update/delete category (pending)

CREATE APIS FOR PRODUCT: Steps:

  1. Create migrations for products table (done)
  2. Create endpoints for create/get/update/delete category (pending)

jiffy-server-cylic's People

Contributors

mansoorabbas123 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.