https://github.com/mguida22/cu-poi-server
Node server for the cu-poi API
https://github.com/mguida22/cu-poi-server
Last synced: 4 months ago
JSON representation
Node server for the cu-poi API
- Host: GitHub
- URL: https://github.com/mguida22/cu-poi-server
- Owner: mguida22
- License: mit
- Created: 2015-08-27T05:52:39.000Z (almost 10 years ago)
- Default Branch: develop
- Last Pushed: 2015-09-29T02:36:34.000Z (over 9 years ago)
- Last Synced: 2025-01-08T18:22:34.542Z (5 months ago)
- Language: JavaScript
- Homepage:
- Size: 289 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cu-poi-server 
Node server for the cu-poi API### TODO
- [x] Move all helper functions from [cu-poi](https://github.com/mguida22/cu-poi) and determine api-endpoints
- [x] Setup and write tests for all functions
- [x] Convert existing data from XML to JSON (including data-entry script)
- [ ] Finish adding data for the rest of CU Campus
- [x] Endpoint for all POIs
- [ ] Setup hosting (AWS?)
- [ ] Improved searching (current search is really bad.. :grimacing:)
- [ ] Move data into a database and update data-entry script to add to database### Usage
```sh
# Initial Setup
$ npm install# Running Locally
$ npm start# Running Tests
$ npm test
```Once the server is running locally you can make requests using `localhost:3000`
#### API
Closest POI:
```
localhost:3000/api/poi/closest?lat=40.0055147&long=-105.2637899
```All POI of given type:
```
localhost:3000/api/poi/type?type=Academic
```All POI in range (meters):
```
localhost:3000/api/poi/range?lat=40.0055147&long=-105.2637899&range=100
```Search for POI using query:
```
localhost:3000/api/poi/search?q=bk
```All Data:
(**this can get large**)
```
localhost:3000/api/poi/all
```### Adding Data
Use the `data-entry` script to ensure that the data is entered properly.
```shell
$ cd Data
$ python3 data-entry.py
```