Instructions how to deploy the full fake REST API json-server to various free hosting sites. Should only be used in development purpose but can act as a simpler database for smaller applications.
- Clone this repository to your computer
2 . Change the contents of db.json to your own content according to the json-server example and then commit your changes to git locally.
this example will create /users route , each resource will have id, firstName and lastName. id will auto increment!
{
"users": [
{
"firstName": "mohamed aziz",
"lastName": "aydi",
"address": "xxx",
"city": "xxx",
"country": "tunisia",
"phone": "01212843661",
"email": "aydiaziz90@gmail.com",
"password": "123456",
"question": "What is your favorite soccer team",
"answerTheQuestion": "xxxx",
"photo": "blob:http://localhost:3000/05ad9d7f-48d1-4972-977e-e86e9c25c342",
"id": 1
}
]
}- Upload This Folder after your updated into new Repo
Not tested 100%. Same as with Heroku, will sleep after a while.
- Register for Glitch or go to Glitch/edit
- Click New Project
- Click Import from GitHub
- Paste
https://github.com/MohamedAzizAydi/Json-server.gitinto the URL-input and click OK. - Wait for it to setup
- Press Share-button to get your URL to live site. It should be something for example like:
https://ar-server-auth.glitch.me/. And your DB will be athttps://ar-server-auth.glitch.me/users
👋 Hello, I'm Mohamed Aziz Aydi - uI & Front End Developer
🚀 Follow Me: