Giter Club home page Giter Club logo

the-code-genin / simple-jwt-api Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 0.0 444 KB

A simple JWT powered API boiler plate written in NodeJS/Typescript and uses an SQL database for data storage out of the box.

License: MIT License

Shell 1.07% TypeScript 87.14% Dockerfile 0.77% JavaScript 11.02%
nodejs jwt-api express mysql mysql-database jwt jwt-authentication api data-storage sql-database typescript typeorm mocha ejs ejs-express nosql-database postgresql sqlite3 sql mongodb

simple-jwt-api's Introduction

Simple JWT API

This is a simple API boilerplate that uses JWT for bearer token authentication. It is written in NodeJS/Typescript and uses MySQL for data storage by default.

The choice of the data storage system can easily be swapped with another SQL/NoSQL database as per project requirements.

The repository can be forked/cloned and used as a bootstrap for API development as all required authentication endpoints and logic have already been implemented.

If you appreciate the project, remember to leave a star! Thank you.

Contributions are always welcomed!

Developed and maintained by Mohammed Adekunle.

Requirements

  • The NodeJS runtime.
  • NPM, Yarn or any similar NodeJS package manager.
  • MySQL or any other supported SQL database.

Features

  • Express as the base requests router.
  • Knex for query builder and migrations.
  • Joi for data validation.
  • Written completely in Typescript.
  • JWT authentication endpoints out of the box for SPAs and mobile apps.
  • Mocha for testing.
  • Twig for view templating.
  • A well defined directory structure.

How To Install

  • Download and place the repository's files in your web server's root directory.
  • Run npm install or yarn install to install the app dependencies.
  • Copy the .env.example file to .env.
  • Update your .env file according to your web server's environment.
  • Run npm run knex migrate:latest to run all migrations.
  • Run npm run dev to fire up the web server.
  • Build something awesome!

Licensing

This project is licensed under the MIT license.

simple-jwt-api's People

Contributors

the-code-genin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.