- by Muhammad Mustadi -
Tested on Node v6.3.1
-
$ git clone PATH_TO_THIS_REPO
this repository -
$ npm install
-
$ node index.js
init.js
will provide results in data/ folder.
database.js
which will export (CommonJS) 5 things:buildings
which is anarray
of building objects.floors
which is anarray
of floor objects.rooms
which is anarray
of room objects.polygonsOfFloors
which is anarray
of floor objects, but instead of rooms they have polygons of each room in that floor.validatedPolygons
which is anarray
of polygons fetched using the rooms ofrooms
array.db.min.json
which containsbuildings
,floors
,rooms
,polygonsOfFloors
,validatedPolygons
in a JSON (not prettified) format.db${key}.min.json
with one of the key from above, contains their value, respectively.
-
Map each floor in a building for its rooms.
-
API server
- Rooms
- Floors
- Buildings
- Floor Polygons
- Room Polygons
-
Create Android Client
-
Create iOS Client
Requires MongoDB
After running init, seed the Mongo database using server/seed.js
or manually with the data from data/
Run $ node server/index.js
.
Routes:
GET /rooms -> List all the rooms in JSON.
GET /rooms/name/:name -> Returns the rooms containing the name :name (using regex)
GET /rooms/id/:roomId' -> Returns the rooms with id :roomId
GET /floors -> List all the floors.
GET /floors/id/:id -> Returns the floors with id :id
GET /buildings -> List all the buildings
GET /buildings/name/:name -> List all the buildings containing name :name
GET /buildings/id/:id -> List all the buildings containing id :id
GET /floor-polygons -> List all the floor Polygons
GET /floor-polygons/id/:floorId -> Returns the floor polygons from floors with id :floorId
GET /v-room-polygons -> List all the Room polygons
GET /v-room-polygons/name/:name -> List all the RP with name :name.
GET /v-room-polygons/id/:roomId -> List all the RP with id :roomId.
OPTIONS / -> Gives the list of allowed request types.
HEAD / -> HTTP headers only, no body.
TRACE / -> Blocked for security reasons.
Reach me out here or just make a PR.
© Muhammad Mustadi - 2016