Skip to content

atlp-rwanda/eagles-phantom-backend

Repository files navigation

PHANTOM

Phantom is an online platform with facilitate the transport into town, we are tracking buses, we assign the buses to drivers and operators.

Build Status Coverage Status

Vision

Modernize the public transport, in order to accelerate and facilitate the displacement of the client and reduce the time spending on the bus station


Project setup


Dotenv setup

  1. Get some stuffs on table
  • Run in terminal npm install
  • Create .env file in project root directory
  • Create the variables for .env taken .env.example as reference for the environment to create which are used in the project
  • You can add other extra environment if you want other specific things Note: Add keys in .env.example to ease next setup for other developers.
  1. Time to serve
  • For you to use your new environment variable you have to import dotenv module in the file where you want to utilise your environment variables and configure it. like this: import dotenv from 'dotenv'; dotenv.config();

  • Then you'll be able to access your environment variables via process.env.YOUR_KEY

  • TYou can then proceed with the other installation!. , happy coding!

Sequelize ORM setup

  1. Configuring .env
    • Download and install pgAdmin
    • Create two databases, one for testing and another for development.
    • Copy DATABASE_DEV_URL=postgres://your_db_user:[email protected]:5432/your_dev_db_name DATABASE_TEST_URL=postgres://your_db_user:[email protected]:5432/your_test_db_name URLs from .env.example to .env
    • Edit them with your real database user, password, port(if you changed the default one) and database name.
  2. Running Migrations (this is to undo and redo migration)
    • Run npm run migrate:reset in terminal to fire up migration
  3. Running Seeds
  • Run npm run seed in terminal to run all seeds

Running server (for the development)

  • Run npm run dev in terminal

Running tests (for the testing of the endpoint)

  • Run npm test in terminal

Deployment

Heroku

Api Documentation

Swagger Documentation

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •