Skip to content

Graduation Project from the Faculty of Science, Computer Science Department

Notifications You must be signed in to change notification settings

Raymond-Youssef/Skimmit

Repository files navigation

Skimmit API

Getting Started

Installing Dependencies

Node.js 14.x

Follow instructions to install the latest version of Node.js for your platform in the Node.js Website After installation, make sure you have Node and npm installed by running the following commands:

node --version
npm --version

If the version of each of them appears, they are installed correctly.

npm Dependencies

Once you have Node.js and npm installed, install dependencies by opening a command prompt and run the following command:

npm install

This will install all the required packages within the package.json file.

Key Dependencies
  • Express.Js is a lightweight backend microservices framework. Express is required to handle requests and responses.

  • MongoDB is a lightweight NoSQL database that is used to store data as documents.

  • Mongoose is a MongoDB ODM that we will use to handle connection to MongoDB.

  • Passport.Js is a node module used to control Authentication/Authorization in the application.

Application Setup

With Node.Js and MongoDB installed, you will need to set your environment variables by doing the following:

  • Create a new file in the main directory with the name .env.
  • Copy the contents of the .env.example to the newly-created .env file.
  • Fill the marked spaces with your own environment variables.
  • Note: You can uncomment the line #NODE_ENV=production to set the Node Environment to production.

Running the server

From within the directory run the following command for development environment:

npm run start-dev

OR this command for production environment:

npm run start-prod

this will start the server on your local environment on a specific PORT.

Testing

Tests can be run using Postman Import the collection in the file Skimmit.postman_collection.json to Postman then run your tests, but make sure you set your base_url.

API Reference

  • Base URL: this application is deployd on Heroku with a base url https://Skimmit-api.herokuapp.com. However, if you run it locally it will be hosted at the default, http://127.0.0.1:3000/.
  • API Documentation: You can find full API documentation here Skimmit API Documentation
  • Authentication: A full explanation of the authentication techniques in the full API Documentation.

About

Graduation Project from the Faculty of Science, Computer Science Department

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published