jesperorb / json-server-heroku Goto Github PK
View Code? Open in Web Editor NEWDeploy json-server to Heroku & Glitch & Azure :up: :free:
Deploy json-server to Heroku & Glitch & Azure :up: :free:
How exactly do you make a request to the app though once its deployed? What would the url be since its no longer local host?
Aside from a piece of middleware I need for my use case, here's an example I've created of deploying to Heroku using only .json files.
Also, the zeit related deployment steps need to be now removed.
I have folder for the client where all react code and in the root I put db.json
and sure package.json in the root too
but there is no server file since I used json-server so I wonder how Heroku run server.js
in the doc of json-server it is recommended to add "start": "node server.js", to package.json but there is no server file 🤔
I'm having an issue with the new Now 2.0
Error: https://zeit.co/docs/v2/routing/status-codes#404
This is my now.json:
{
"version": 2,
"engines": { "node": "^10.0.0" },
"builds": [
{ "src": "db.json", "use": "@now/static" },
{ "src": "index.js", "use": "@now/node" }
]
}
hi, i am unable to find any documentation on how to change routes.
Also, putting console.log messages in the nested.js, singular.js etc is not working.
also, added <>.use('path', 'to-path') also not working
I'm not sure if this is a feature request or an issue...
I've been trying to figure out how to set the database id, which you can do in an npm script like this:
"scripts": {
"differentId": "json-server db.json --id name"
}
The only thing I could think of was to pass the following options in server.js:
const router = jsonServer.router('db.json', { foreignKeySuffix: 'name' });
But that did not do the trick.
Is there a way to do this?
Hi @jesperorb,
Awesome work, I was able to deploy it Heroku but my question is can this be deployed to Netlify? I can't seem to get it to work.
Thanks!
Hello!
Cool, does this include middlewares?
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.