See our new Wiki!
This wiki is in legacy mode. Check our new wiki here!
Deployments Azure json server
Before start
Kudu
General steps: Create an App Service. Wait till it’s implemented, then go to the Deployment Center and configure your Repo with the Kudu path.
Kudu/SCM console portal: To access Kudu/SCM console portal navigate to http://MYAPPSERVICE.scm.azurewebsites.net. For more information check this link
json-server
-
Add “engines”: {“node”: “^10.14.1”} to the package.json (to see all available Node versions check Deployment Center logs after finishing all these steps). See sample JSON file
-
Create a file named server.js on the project’s root folder with the following content:
const jsonServer = require('json-server') const server = jsonServer.create() const router = jsonServer.router('db.json') const middlewares = jsonServer.defaults() server.use(middlewares) server.use(router) server.listen(process.env.PORT, () => { console.log('JSON Server is running!') })
-
Your CI build is ready just Commit and Push your changes.
Equilaterus (CC-BY) 2018 - 2022.