create-basic-auth-express-app

1.0.5 • Public • Published

Basic Express.js Server and Folder Structure

Overview

This project provides a setup for a basic Express.js server with a predefined folder structure and basic APIs. It includes commands to quickly scaffold a new Express.js application and set up authentication-related endpoints.

Quick Start

Create a Basic Express.js Server

Run the following command to create a basic Express.js server with a predefined folder structure:

npx create-demo-express-app

Create Basic Auth Setup

To create a setup with basic authentication APIs (register, login, logout, profile), run:

npx create-basic-auth-express-app

Included APIs

The basic authentication setup includes the following prewritten APIs:

  • Register
  • Login
  • Logout
  • Profile

Folder Structure

The scaffolded application will have the following folder structure:

project-root
│
├── public
│   ├── avatar
│   └── ...other static files
│
├── controllers
│   └── userController.js
├── models
│   └── User.js
├── routes
│   └── userRoute.js
├── middlewares
│   └── auth.js
├── utils
│   └── jwtToken.js
├── config
│   └── database.js
│
├── app.js
│
├── .env
├── package.json
└── README.md

Usage

  1. Install dependencies:

    npm install
  2. Start the server:

    npm run dev

    or

    npm start
  3. Environment Variables: Configure the .env file with necessary environment variables like database connection strings, secret keys, etc.

Readme

Keywords

none

Package Sidebar

Install

npm i create-basic-auth-express-app

Weekly Downloads

0

Version

1.0.5

License

ISC

Unpacked Size

15.7 kB

Total Files

10

Last publish

Collaborators

  • anshudevtrust
  • evilanshu