Skip to content

Latest commit

 

History

History
38 lines (28 loc) · 1.73 KB

README.md

File metadata and controls

38 lines (28 loc) · 1.73 KB

send-it

Build Status codecov npm version

SendIT is a courier service that helps users deliver parcels to different destinations.

The project is implemented according to the specifications which can be found in the SendIT-Javascript.pdf file. For example, you could ask why I'm not using sequelize rather than going direct with node-postgres for database interactions, that's beacuse the project specification said so.

The project is based on specifications received from Andela at a time, during applications to be a volunteer mentor at one of their programs.

Development Setup (Linux)

Requirements

  • Nodejs (>=12)
  • npm | yarn
  • PostgresSQL

Getting Started

  1. Clone repo
  2. Copy .env.sample to .env and edit appropriately
  3. Run ./utils/create_db.sh sendit. A helper script to create DB (and tables) locally or you can create maually. The argument passed to the script indicates the database name, and must match the value in env file.
  4. Run npm i to install dependencies
  5. Run npm run watch to get started

Running Test

To run tests, you have to create a test DB and also create all needed tables. I've created a bash script to automate this process. It uses localhost for connection, and assumes postgres as the default database user.

  npm run create-test-db
  npm test

Meta

You can find the link to the pivotal here