Giter VIP home page Giter VIP logo

shipper-server's Introduction

Shipper

Web

Traffic Management System for Coastal Regions. Developed for ASEAN-India Hackathon 2021 - PS7 and won Encouragement Award.

Demo

Shipper-Web

For Frontend- Refer to Shipper-Web

Local Development

Prerequisites

Environment Variables

Make sure you have set the following environment variables. You can also use a .env file. An .env.example file is provided in the repo.

DATABASE_URL

Url of the Postgresql Database. For Eg. postgresql://postgres:postgres@localhost:5432/shipper

PORT

Port on which you want the server to run. For Eg. 4000
If you change this, you have to make appropriate changes in docker-compose.yml

FRONTEND_URL

URL on which the Frontend (Shipper-Web) is running Gor Eg. http://localhost:3000. If this is incorrect, you will face CORS issues

DB_ENABLE_SSL

set to true for enabling SSL connection to the database. Only set to true when deploying and your database provider only supports SSL

Install Dependencies

yarn install
or
npm install

Start Development Server

yarn dev
or
npm run dev

This will start a develoment server for the frontend on http://localhost:4000

Run Migrations

This will create necessary tables in the database. Required to run only once.

yarn init-database

Deployment

Create a production build

This will create a production build that can be deployed.

yarn build
or
npm run build

Start the Production Server

yarn start
OR
npm run start

For Deploying, you can use Docker (with Docker Compose).

The project is configured to use its own Postgresql Database, so make sure either the hosts port 5432 is free or map the port for docker container shipper_db to another port and make changes to shipper_servers environment variables section.

docker-compose up --build

Getting Started

The server uses Socket.io to provide Bi-Directional Communication to all clients connected as the location of ships changes. The Updated data is then stored in the database.

Build and Start the Frontend Server (Shipper-Web), make sure the API_URL is properly configured and follow the instructions in Getting Started.


LICENSE

Eclipse Public License (EPL)

You are free to modify the code. Redistributions are not allowed without prior request from the original author. You are obligated to include the full license and the copyrights.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.