Skip to content

Patzi275/express-typescript-api-boilerplate

Repository files navigation

Express API Boilerplate

This project is a boilerplate for building APIs with Express and Node.js. It follows best practices for organization and testing, making it a great starting point for your next project.

Features

  • Express: Fast, unopinionated, minimalist web framework for Node.js
  • Authentication: Register, login, and protect routes using JWT

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Package used

  • Express - Fast, unopinionated, minimalist web framework for Node.js
  • Nodemon - Automatically restart the node application when file changes in the directory are detected
  • Bcrypt - A library to help you hash passwords
  • Dotenv - Dotenv is a zero-dependency module that loads environment variables from a .env file into process.env
  • Express-validator - An express.js middleware for validator
  • MySQL2 - MySQL client for Node.js with focus on performance. Supports prepared statements, non-utf8 encodings, binary log protocol, compression, ssl
  • Sequelize - Sequelize is a promise-based Node.js ORM for Postgres, MySQL, MariaDB, SQLite and Microsoft SQL Server. It features solid transaction support, relations, eager and lazy loading, read replication and more
  • Jsonwebtoken - An implementation of JSON Web Tokens

Prerequisites

  • Node.js
  • npm

Installation

  1. Clone the repo
    git clone https://github.com/Patzi275/express-typescript-api-boilerplate.git
  2. Install NPM packages
    npm install
    

Usage

After installing the dependencies, you can start the development server by running:

npm run dev

This will start the server at http://localhost:3000. The default port can be changed in the .env file.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Releases

No releases published

Packages

No packages published