Skip to content

psovea/api-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OVerzicht API

This repository contains the code for requesting static and dynamic data regarding public transportation in the Netherlands.

Development

Checking out the branch and installing dependencies

Checking out the repository (make sure that nodejs is installed):

git clone git@github.com:psovea/api-backend.git
npm i

Starting the API (endpoints for the front end) DEPRECATED

Running the API locally can be done by simply running the following command:

npm start

This will start a server that listens to port 3000. An easy way to do requests is to install postman.

Starting the deamon for extracting static data

This repository includes a script that retrieves the current state of the public transport in the Netherlands. To retrieve this data and store it in our static database, run the following command:

> npm run static

Starting the socket for live data

> npm run socket

You can now connect to the socket on port 3500.

Contributing

Coding Style

We use the standardjs coding style. The easiest way to incorporate this into your workflow is to install a linter:

To check if it passes the test, you can run npm test

Documentation

For some more information, please refer to the wiki