This node js application serve as the backend for the Saas product.
project-root/
├── config/ # Configuration files
├── controller/ # Controllers for handling requests
├── middleware/ # Middleware functions
├── models/ # Database models
├── routers/ # Route definitions
├── utils/ # Utility functions
├── .env # Environment variables
├── .gitignore # Git ignore file
├── package.json # Node.js package file
├── README.md # Project documentation
└── server.js # Main server file
- Clone the repository:
git clone https://github.com/your-username/your-repo.git cd your-repo
- Install dependencies:
npm install
- Create a .env file in the root directory and add the necessary environment variables:
PORT=3000 DATABASE_URL=your-database-url FIREBASE_API_KEY=your-secret-key
- Update the configuration files in the config/ directory as needed.
- Start the development server:
npm run dev
- Start the production server:
npm start
Provide a list of available API endpoints and their descriptions.
GET /api/auth/get-user-data
- Retrieve a user by firebase access token
POST /api/auth/create-user
- Create a new user
POST /api/training//create-lab
- Create a new LAB
GET /api/training//labs
- Get all the lab assign to the user
GET /api/training//labs/:labId
- Get a specific lab by ID