Skip to content

601-H17/pathfinder-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Path finder API Build Status

To install NodeJS, follow this guide

1. In a terminal, you need to go in the project directory:

$ cd the_project/

2. When you're in, restore all the dependencies:

$ npm install

3. Build the project:

$ npm run build

Note: You have to build everytime the project is updated.

4. Start the server:

$ npm start

5. Run unit tests:

$ npm test 

You can use Postman too to call the API.

GET a path with 2 params (localA and localB): localhost:8080/api/pathfinder

POST a new corridors map with map json ({map : /* map infos */}): localhost:8080/api/pathfinder/corridor s

Note: Babel est utilisé, car les "async/await" ne sont pas encore gérés par le compilateur. Normalement, à partir de Mai 2017, ils seront gérés et Babel pourra être retiré.