Skip to content
This repository was archived by the owner on Sep 4, 2024. It is now read-only.

Files

Latest commit

 

History

History
44 lines (30 loc) · 1.83 KB

README.MD

File metadata and controls

44 lines (30 loc) · 1.83 KB

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.