Comments (9)
I was able to get your code to print stops when loading
http://localhost:3000/getstop?lat=59.4519345122069&lng=24.5839149880253
Can you paste what output you get when loading that route in your browser?
from node-gtfs.
(node:8468) DeprecationWarning: Mongoose: mpromise (mongoose's default promise library) is deprecated, plug in your own promise library instead: http://mongoosejs.com/docs/promises.html
Got (404)
from node-gtfs.
Can you post your whole project as a git repo including the package.json? Its possible that this issue is caused by how the various npm packages were installed.
Doing a fresh npm install based on a package.json for this project might solve it.
from node-gtfs.
You have the whole app.js. I don't have any other server-side files and none of the clientside files are completely separate.
Here's the package.json:
http://pastebin.com/9VH36Z6Z
In overrides.txt I have:
[stop_id]:Lorem Ipsum
I launch the app from an elevated command prompt.
Version of NodeJS: 7.2.1
Version of MongoDB: 3.2
from node-gtfs.
Try specifying mongoose version 4.7.0 in your package.json and deleting then reinstalling all node_modules. I suspect there is an issue with mongoose promises and the fact that node-gtfs specifies a version that is different than your package.json. Alternatively, you could remove mongoose from package.json which will force your project to rely on the version specified by node-gtfs.
I'm going to work on making this not happen - but let me know if that solves your issue.
from node-gtfs.
You could make mongoose 4.7.x a peerDependency of your project, so it will just use the version specified in node-gtfs if you want.
from node-gtfs.
SuperSaltyGamer, it seems like you are printing "Got (404)" in two cases:
- when "lat" or "lon" isNaN
- in the end of the "app.get('/getstop'..."
First of all, I'd recommend renaming the error message, because maybe "lat" or "lon" are empty due to req.query not working.
Another something I noticed:
gtfs.getStopsByDistance - is async if I remember correctly.
It could be that you are "res.status(404).send();" before "gtfs.getStopsByDistance" finishes running - which might result in sending a response before you finish querying.
Try moving lines 79, 80 to after line 76.
Let us know 👍
from node-gtfs.
The first print is actually "Got (400)".
After moving 79 and 80 to 76 it still didn't work.
While keeping the lines on 76, after changing mongoose to version 4.7.0 in package.json and reinstalling all modules it gave this error http://i.imgur.com/H6m3OJE.png.
Then when I changed the mongoose dependency to a peerDependency with the version 4.7.x and reinstalled it worked.
Also a newline seems to be missing here http://i.imgur.com/ecRYJVj.png.
Also a option in the config to disable redownloading everytime you start the server would be very useful.
from node-gtfs.
from node-gtfs.
Related Issues (20)
- Importing multiple feeds HOT 2
- transfers.txt default transfer_type HOT 2
- Typescript Support for node-gtfs HOT 4
- Package GTFS states MongoDB, Github States MySQL HOT 3
- Cannot use multiple databases at once HOT 2
- GTFS Fares V2 HOT 1
- GTFS Fares V2 Leg rules amount HOT 4
- [Feature Request] Create option to ignore SSL validation HOT 3
- Can I use the command line for query operations? HOT 6
- GTFS-R TripDescriptor HOT 5
- Working with Docker Database locked HOT 4
- Dropping/Clearing database HOT 1
- Deployment on errors HOT 5
- Invalid default csv parser option "relax" in import script. HOT 2
- Performance improvements HOT 4
- Possible performance improvement: DuckDB HOT 3
- Changing internal maxInsertVariables has significant impact on total import time HOT 4
- Agency_id defined in agency.txt but not in routes.txt results in invalid GTFS export HOT 1
- Edge deployment and SQLite HOT 4
- Not running with Deno HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-gtfs.