Mathias
Mathias

Reputation: 605

Hosting a website on GitHub and connecting to a database

I apologize for the amateur nature of my question, but I am all rather new to this. So I have created a project within the cloud9 IDE, which is a website that connects to a mySQL database located on the same server. However, I wish to showcase the code that I have used to create the site. I have done a little research into doing this and so far I have found that GitHub Pages can allow you to host webcontent. Thus in theory I can just copy across the files from cloud9 to a GitHub repository. However, my site relies on being able to connect to and query a mySQL database. My question is, can and how would I connect my GitHub repo to such a database?

Any help/advice would be greatly appreciated! In addition, please let me know if I am barking up the wrong tree with this...

Upvotes: 1

Views: 4705

Answers (2)

Araphel
Araphel

Reputation: 307

If you've been working on a server-side technology, then you could be running on localhost.
If thats the case, try tunnelling your localhost, which allows you to share your localhost with others on other networks.
localtunnel, ngrok and forward provide such technologies.

Upvotes: -1

Jozef Izso
Jozef Izso

Reputation: 1804

GitHub Pages are only for static HTML websites. It does not run any server side technology.

You must find web hosting based on the technology you used to create the website.

Upvotes: 1

Related Questions