NodeJs, MongoDB를 사용하여 구성하였습니다.
$ cd [Base directory]
$ git clone https://github.com/KNU-MobileApp-Team8/Server.git
$ cd Server/Server
$ npm install --save
$ mongodb --dbpath [Database directory]
$ node app.js
예시로 사용되는 curl은 아래 링크에서 다운로드 받으실 수 있습니다.
https://curl.haxx.se/download.html
1. GET : 교내 모든 건물들의 정보 요청
$ curl -X GET http://HOST:PORT/api/building
Name
Type
Buildings
Array(Json)
2. GET : 교내 특정 건물의 정보 요청(Path : /api/building/:number)
$ curl -X GET http://HOST:PORT/api/building/400
1. GET : 교내 모든 경로들의 정보 요청
$ curl -X GET http://HOST:PORT/api/roadspot
Name
Type
RoadSpots
Array(Json)
2. GET : 교내 특정 경로의 정보 요청(Path : /api/roadspot/:number)
$ curl -X GET http://HOST:PORT/api/roadspot/10
Path: /api/path?from={:roadSpotNumber}&to={:buildingNumber}
1. GET : 특정 분기점과 도착 건물에 대한 경로 정보 요청
$ curl - X GET http://HOST:PORT/api/path? from=1001& to=501
$ curl - X GET http://HOST:PORT/api/image/404
Building information Image
Code
Description
200
Success
Code
Description
400
Insufficient or incorrect parameters
404
No data in server
409
Conflict
Code
Description
500
Server error