Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
app
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

NJDOT Fuel Up API

This is the backend for the njdot-fuelup app located here. This API was created with Servant.

How to run:

First get The Haskell Tool Stack if you don't already have it.

stack setup 
stack build
stack exec njdot-fuelup-api-exe

It will begin listening on listen on 127.0.0.1:80/

This api has two GET requests:

GET /bridges?latitude=<lat>&longitude=<lng>
GET /stations?latitude=<lat>&longitude=<lng>

The latitude and longitude parameters are required otherwise an empty list will be returned. Both endpoints return JSON formatted locations ordered by distance away from the specified coordinates.

If you want to recreate the database (sqlite3):

rm njdot-fuelup.db
stack ghci
Main Api Database Model> initializeDB

To run tests:

stack test

About

An API for the NJDOT Fuel UP iOS app written in Haskell using Servant.

Resources

License

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.