Skip to content

init0-hack8/backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Express.js Backend

A basic Express.js backend server with a modular structure and Firebase integration.

Setup

  1. Install dependencies:
npm install
  1. Create a .env file in the root directory and add your environment variables:
PORT=5000
  1. Set up Firebase:
    • Go to the Firebase Console
    • Create a new project or select an existing one
    • Go to Project Settings > General
    • Scroll down to "Your apps" section
    • Click on the web icon (</>)
    • Register your app with a nickname
    • Copy the Firebase configuration object
    • Save it as firebase_key.json in the backend root directory

Running the Server

Development mode (with auto-reload):

npm run dev

Production mode:

npm start

API Endpoints

  • GET /: Welcome message
  • GET /api/health: Health check endpoint

Project Structure

backend/
├── node_modules/
├── routes/
│   └── index.js
├── controller/
│   └── firebaseSetting.js
├── utils/
│   └── jsonLoader.js
├── .env
├── .gitignore
├── firebase_key.json
├── package.json
├── README.md
└── server.js

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published