How to host AngularJS, MonogDB, Node.js, ExpressJS project on GitHub?
I have uploaded normally like a static HTML page but it didn't work.
How to host this project as it consists of four technologies
You can't host a MEAN stack site on GitHub Pages:
GitHub Pages is a static site hosting service and doesn't support server-side code such as, PHP, Ruby, or Python.
Similarly, GitHub Pages doesn't support Node.js or MongoDB.
Since github pages host only static resources like html, css and javascript you cannot host a node application there. You could try hosting your project on Digital Ocean, Heroku, AWS etc. These provides free trials versions as well. Here you can set up your own server and get things working.
Related
I have a toDo web application made in NODEJS. I want to include it in my resume and want 2 links , one for project code and other for project demo ? Is there any way to show live demo of this nodejs project just like we can have github pages for a frontend project ?
To show the code, you can put the github link, and for the demo, you have to host your site, for example on AWS or Azure. But these hosting are not free and I don't know if it's possible to host a Node.js site for free
When I hosted my first site, Heroku was the easiest of the free options I looked at. Today I think Netlify is easier.
I have hosted static sites before and here;s how it worked:
I have my HTML, CSS, JavaScript files ready
I upload them to a hosting site
and the website goes up
But now I'm starting to work on backend development with Nodejs and using Mongodb for databases.
I'm currently running my Mongodb database on a localhost.
Do I follow the same procedure as before when trying to host the site, or is there something I have to do differently?
(I figured It's different, but I don't know how to approach it)
I am newbie in web development. And I am working on ember with firebase using emberfire.
As I found that I can deploy the ember project to Firebase hosting, do firebase hosting support asset hosting only? And I have to host my ember web project in another hosting?
Thanks a lot.
From the Firebase Hosting documentation:
Firebase Hosting provides fast and secure static hosting for your web app.
Embjer.js is a front-end only framework. Web applications built using Ember.js can be run on Firebase Hosting.
Give it a try and report back if you have a specific problem.
Ember requires NodeJS (npm) installed on your hosting to work. Firebase Hosting doesn't have anything like that.
Point of correction: Ember.js is a front-end tool like AngularJS, therefore you can use it with Firebase, which supports only static files hosting.
Firebase Hosting only stores assets (css, js and images files) and doesn't have any form of installing serverside packages.
fast forward to 2019, firebase now offers functions where you can write dynamic code for your static app. It uses node (express.js).
https://firebase.google.com/docs/functions/use-cases
I have a project here that is on github. I created a gh-pages branch to make it hosted on github pages. The link they gave me to my hosted site is here.
I am pretty new to web apps and especially new to MEAN stack web apps. My question is - how can I access my web app now that it is hosted via github? Obviously the hosted link gives a 404 error because I don't have an index.html file in the root of the project. The "html" I have in the project is in the views folder and has an "ejs" file extension (index.ejs).
To run this app on my local machine I start an npm server:
npm start
Then I navigate to http://localhost:3000/#/home in a browser to see the app.
Is it even possible to host this app on github pages? Do I need to modify my project in some way to make it work? Also - I know I will have to change the mongoose database pointer for the database portion to work. Any pointers in the right direction would be greatly appreciated!
Github does not host nodejs instances.
If you want to host a it on GitHub pages you can follow these steps:
Separate Angular front end with node back end API.
Host your Angular front end to GitHub pages.
Then host your node back end to some cloud hosting. Make sure you have CORS enabled. It will work as a REST API.
Now use the REST API end points to wire up the the whole app.
i have developed a simple webapp using socket.io and node.js and was wondering how i would deploy it to a server? My application uses an HTML file with a canvas element the user interacts with how would i deploy this, the css and the js files and the app.js file to the server?
thanks
In some hosting companies that support Node.js (like Nodejitsu and Heroku) you can deploy your static files as part of your application code. In other words, when you deploy your app both your code and static files (JS/CSS/Images) will be deployed.
The downside with this approach is that you cannot easily just change a CSS file like you can in a more traditional deployment where you can just FTP a new CSS file to the production server. You could bypass this if you host your CSS files somewhere else, though.
I don't have experience with AppFog but I suspect the same is true.
You have a 90 day free trial at Azure. Believe it or not but they have great support for node.js. Read more at http://www.windowsazure.com/en-us/develop/nodejs/