Giter VIP home page Giter VIP logo

json-server's Introduction

render-json-server

Watch This Video

Click to watch the video

Hello everyone in this video you will learn to deploy your db.json file on render.com step by step.

Step 1 - Create git repository

Step 2 - Clone it on your device

Step 3 - Add package.json by using this command npm init -y

Step 4 - Install some dependency by using this command npm i json-server cors json-serve and add "start": "node index.js" in script

Step 6 - Create index.js file copy the code from my GitHub repository

const jsonServer = require("json-server"); // importing json-server library
const server = jsonServer.create();
const router = jsonServer.router("db.json");
const middlewares = jsonServer.defaults();
const port = process.env.PORT || 8080; //  chose port from here like 8080, 3001

server.use(middlewares);
server.use(router);

server.listen(port);

Step 7 - Add db.json and add .gitignore file

After all this steps are completed use this command to push the code in your Github account.

git add .

git commit -m "Your message"

git push origin main

If you find this video helpful please subscribe to my channel and share this with your friends. If you have any queries ask in the comment section below I will be happy to answer you all.

json-server's People

Watchers

Yash Jaiswal avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.