Closed devtud closed 8 years ago
The code (simple express app) used is here: https://github.com/bananaoomarang/isomorphic-redux/blob/master/redux-tutorial-backend.js.
You will just need to remove the webtask
require at the top and the module.exports
line at the bottom. Install the require
d modules and add app.listen(<port>, cb)
to start the express app.
I did so but it crashes in app.post
for example
var MONGO_URL = req.webtaskContext.data.MONGO_URL;
because req
does not contain webtaskContext
key.
Ah, yes, sorry. You will have to set up a mongo database somewhere for that url to point to.
I was using a free one from mlab, but you could use a local one too.
How can I run the API server on my computer and on my local database instead of
https://webtask.it.auth0.com/api/run/wt-milomord-gmail_com-0/redux-tutorial-backend?webtask_no_cache=1
?