pg_scheduleserv

command module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2022 License: AGPL-3.0 Imports: 10 Imported by: 0

README

pg_scheduleserv logo

pg_scheduleserv - VRP scheduler over the web

Go Reference GitHub go.mod Go version Go Report Card GitHub Release GitHub all releases GitHub Release Date

Introduction

A RESTful API Server for scheduling VRP tasks using vrpRouting, written in Go.

API Documentation: docs/api.md Release Notes: NEWS.md

Status

Service Main Develop
Test Test Test
Lint Lint Lint
Coverage codecov codecov

Getting Started

Requirements
  • Build Requirements:

    • Go == 1.17
  • Usage Requirements:

Download and run

Builds of the latest code can be found in the releases.

  • Download the latest executable for Linux, say pg_scheduleserv-0.2.0.
  • Change permissions to make it an executable: chmod +x pg_scheduleserv-0.2.0
  • Create app.env, and set the values to the environment variables:
  • Create the tables in the database with the help of the migrations file.
  • Run the executable to start the API server on http://localhost:9100
Build from source

All the steps are similar as above, except that the executable will be built from source.

pg_scheduleserv is developed using Go 1.17. To build this project from source:

  • Ensure that the Go compiler is installed
  • Download or clone this repository.
  • Copy app.env.example to app.env, and set the values to the environment variables.
  • Apply migrations from the migrations/000001_init.up.sql file to the database.
  • Run go build command inside the directory to create the executable named pg_scheduleserv
  • Run the executable to start the API server on http://localhost:9100
Usage

Any API client can be used to interact with the API server. The API can also be tested using the Swagger documentation. Sample deployed API can be found on https://api.udc.pgrouting.org/

These documenations can be accessed after running the API server on the following URLs:

swagger-api

Demo Application

A frontend demo application for the API resides in the demo directory. Sample deployed demo application can be found on https://vrpdemo.udc.pgrouting.org/

To run the demo application:

  • Change directory to the demo directory: cd demo
  • Make sure that node is installed. Install the other requirements: npm install
  • Run the application: node server.js. The application will run at http://localhost:9101 and will use the API running at http://localhost:9100
  • To change the Server Base URL or the OSRM API URL, modify the js/config.js file.

demo-application

LICENSE

This project is licensed under the GNU Affero General Public License v3.0. View LICENSE for more details.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package docs GENERATED BY THE COMMAND ABOVE; DO NOT EDIT This file was generated by swaggo/swag
Package docs GENERATED BY THE COMMAND ABOVE; DO NOT EDIT This file was generated by swaggo/swag
internal
api

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL