Skip to content

JustinFrost47/Outpass_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Outpass Backend API Documentation Overview

This project is a simple API/backend for storing and tracking outpasses. It is released under the GNU General Public License (GPL), allowing others to freely develop upon and contribute to the project. Setting Up Requirements

Node.js
MongoDB

Installation

1Install Node.js and MongoDB on your system.

nodejs: https://nodejs.org/en/download https://www.mongodb.com/docs/manual/administration/install-community/

or if you are using a unix system , use the appropriate command and install them like a chad :)

2.Run the command npm install to install Node dependencies.

3.Execute node index.js from the project's root location to start the server.

Project Structure

  1. Views

The frontend portion of the API is located in the views folder. Any changes to the frontend should be made here. Certain routes render files from EJS, so refer to index.js code for informed decisions. In the future, this part should be modularized using EJS mate to split the navbar and other partials.

  1. Models

This folder contains schemas for MongoDB collections. The main collection, 'student', stores related outpasses in a list of object IDs. The 'outpass' schema is simple, containing reason and roll number, which can be expanded upon if needed.

  1. Utilities

This folder includes helper codes that streamline the application:

appError: Helps create middleware for handling errors.
asyncWrapper: Handles asynchronous requests properly.
  1. index.js

This file contains the main logic of the API.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published