7

I made an angularJS application and it runs form github.io. But I need to use REST API to handle data. I use json-server at my localhost. Is it possible to create and use json-server in github?

2 Answers 2

8

I know its old question but I'll still post an answer here just in case someone else wants it.

It is possible to have json-server running in Github pages. Here is the link [https://my-json-server.typicode.com/][1]

Basically create a db.json file in your repository just like you do in the local system. you can access your api with https://my-json-server.typicode.com// as your your root URL.

Sign up to request clarification or add additional context in comments.

Comments

2

No, it is not possible because github.io only delivers static files and doesn't run any server.

You will need to use another hosting provider to run the json-server.

See also this question

1 Comment

Using shared hosting service (like hostgator) will work ? @brclz

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.