Skip to content

Aksha4/Phase-1

Repository files navigation

Backend Development Project

Overview

This project is a Node.js and Express backend application developed as part of the backend development syllabus.

Features

  • Express.js server
  • SQLite database
  • User registration
  • User login
  • Password hashing with bcryptjs
  • JWT authentication
  • Protected API routes
  • Request logging
  • Environment variables using dotenv

Technologies Used

  • Node.js
  • Express.js
  • SQLite3
  • bcryptjs
  • jsonwebtoken
  • dotenv

Installation

  1. Clone the repository.
  2. Install dependencies:
npm install
  1. Create a .env file:
PORT=3000
JWT_SECRET=your_secret_key
  1. Run the migration:
node src/migrations/migrate.js
  1. Start the server:
node app.js

API Endpoints

Method Endpoint Description
GET / Home
GET /about About
GET /contact Contact
GET /health Health Check
POST /api/auth/register Register User
POST /api/auth/login Login User
GET /api/auth/profile Protected Profile

Authentication

Protected endpoints require an Authorization header:

Authorization: Bearer <JWT_TOKEN>

Author

Akshay

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages