Skip to content

This repository provides a Node.js application for demonstrating JWT authentication and authorization. It includes features such as user registration, user login, and authorization process. The application is built using Express.js, JWT for authentication, Sequelize ORM for database interactions, and MySQL for database storage.

License

Notifications You must be signed in to change notification settings

vitabletech/node-express-api-bootstrap

Repository files navigation

Node App Setup Guide

This guide will help you set up and run the Node.js application along with PHPMyAdmin using Docker with the added convenience of a development container.

Prerequisites

Installation

  1. Clone the repository:
git clone https://github.com/vitabletech/node-express-api-bootstrap.git
  1. Navigate to the project directory:
cd node-express-api-bootstrap
  1. Rename .env_sample to .env andEdit the .env file to configure your environment variables. You may also need to adjust the docker-compose.yml file if you wish to use non-default settings.

Running the Application

  1. Start the Docker containers:
docker-compose up -d
  1. Open your web browser and go to http://localhost:8081 to access PHPMyAdmin.

  2. Create a new database named testdb as specified in the .env file. If you made any changes to the database name, ensure to create it with the updated name.

  3. Access the container shell:

docker exec -it vitabletech-node-app /bin/bash
  1. Inside the container, run the following command to synchronize the database:
npm run sync-db && npm run seed

This command will automatically create the required tables.

  1. Once the database synchronization is complete, you can start working on the application.

  2. Access the Node.js application at http://localhost:8080.

Enjoy!

You're all set up and ready to start working with the Node.js application. Happy coding!

What This Repository Offers

This repository provides a Node.js application for demonstrating JWT authentication and authorization. It includes features such as user registration, user login, and authorization process. The application is built using Express.js, JWT for authentication, Sequelize ORM for database interactions, and MySQL for database storage.

  • Bootstrap project for creating APIs using Express.js
  • Pre-configured ESLint setup for code quality assurance
  • Husky and commitlint integration for enforcing commit message conventions
  • Unit test cases setup for ensuring code reliability
  • Code coverage setup for measuring code quality
  • Demonstrates JWT authentication and authorization
  • Includes user registration and login functionality
  • Utilizes Sequelize ORM for database interactions
  • Supports MySQL for database storage

About

This repository provides a Node.js application for demonstrating JWT authentication and authorization. It includes features such as user registration, user login, and authorization process. The application is built using Express.js, JWT for authentication, Sequelize ORM for database interactions, and MySQL for database storage.

Resources

License

Stars

Watchers

Forks

Packages

No packages published