restful-api-for-easy-deploy-to-services-like-cyclic
v1.2.0
Published
A fake RESTful API for testing purposes, ready to deploy to services like Cyclic.sh.
Maintainers
Readme
LICENSE
MIT
RESTful-API
A fake RESTful API for testing purposes,running using the npm module json-server. Ready to deploy to services like Cyclic.sh.
Installation (using any of the two below methods)
Run npm to install RESTful-API:
Method 1: using npm package below
npm i restful-api-for-easy-deploy-to-services-like-cyclicgo to node_modules and you will find a folder with name (restful-api-for-easy-deploy-to-services-like-cyclic)cut the whole folder and paste the contents in your repo---(note-> first you have to create your own repo)LICENSE, README.md, db.json and server.js must be there in your repoif you are not using this package.json then you need to install json-server as dependency in your package.json----> npm i json-serverMethod 2: cloning of my repo from github
clone it and the total structure will be at your end. Then do npm install
npm installHaving completed the above process follow the below process:
Now you are ready to deploy to Cyclic.sh:
create your endpoints in db.jsongit add .git commitgit push
Create account in Cyclic
Go to Cyclic.shClick on sign upClick on (Continue with GitHub)
After Successfull Login
- Click on Deploy button
Click on (Link Your Own) tabIn search box type your repo that you created for deploymentIf your repo is in private mode---it will show Add a private repo option below----click on itIt will ask for a password confirmation of githubEnter the password of your github accountIt will redirect to a page where you have to select Repository access.Select option called (Only select repositories) --best according to my view.Then choose the repo from the dropdownClick on (Appove and install)Cyclic will start its build and deploying processAfter successful build scroll down the page and click on the dashboard button
On dashboard page
Head on to (Environments) tab and click itIn Custom subdomain you can write the name you want and it will create an additional subdomain for youInitially it takes 1-2 minutes for change of domainRefresh the page and you will see your custom urlHurray! you are ready with your deployment nowNow you don't need to worry even you change the data as it will automatically deploy after each commit to that repo
Editing the initial data
The database is in the file db.json. You can edit the JSON information there.
HTTP Requests & Endpoints
Refer to the json-server documentation for how to use your API.
