Where can i upload an Express application on webserver? - node.js

I'm a new beginner in the express environment and i've one question(i know that it's probably a stupid question): once i've created my own app written in node.js, where can i upload this app?

It sounds like you're basically trying to figure out how to deploy a Node application so you can use it publicly.
Good question.
I think the simplest way (and this is just one of many) is to use Heroku. I'm not affiliated with them at all.
Once you've signed up for Heroku, you can essentially deploy your Node app to their service using just a few command line commands:
$ heroku create
$ git push heroku master
$ heroku open
This will essentially create a new Herkou app, deploy your application there, then open your browser to the newly deployed app page so you can test it out.
Heroku is a hosting provider that lets you deploy apps using Git, and handles all of the dependencies, etc.

Related

trouble deploying full stack application on heroku

I have made a full-stack app with react js and node js with express and MongoDB but I am having a little bit of difficulty deploying I first tried to deploy the front end but I was getting the invalid host header coming up when I tried to deploy in Heroku its been tested and works fine in the dev environment.
But also my application has two separate git repos one for the back and one for the front end and every tutorial I have seen to deploy they always have the client in the same folder as the server.
Can someone either tell me how to deploy or point me in the right direction on how to deploy.
What you have to do for React/Express/Node/MongoDB is,
build your frontend app first by using "npm run build". This will create a build folder under your app folder.
move your "build" folder to backend app folder.
update your backend app to use "app.use(express.static('build'))".
Then you can push your code to git and Heroku and try to deploy it.
There should be some tutorials available on Heroku website.

Deploy Nodejs + ReactJs to Heroku

I'm learning how to deploy a web site to heroku.
My web app has a nodejs project and one mysql in the server side, a reactjs in the client side.
Can you show me the steps that I need to do? Because I'm new to this.
Thank you very much
Here is a step by step guide.
Put your app aside for a few moments and follow these:
To learn how to deploy a nodejs
https://devcenter.heroku.com/articles/deploying-nodejs
Now learning how to add a mysql database
https://devcenter.heroku.com/articles/cleardb#provisioning-the-shared-mysql-add-on
This will teach you how to deploy a 'raw' react app
https://blog.heroku.com/deploying-react-with-zero-configuration
Now, it's all about how you want things to be. You can have a route on your nodejs app that serves the index.html with the react app or a separate app for nodejs and for react. You should probably make them separated, just to keep things organized, but since it's your first deploy and you're probably using it as a hobby or to learn, any way is correct as long as you get it to work. Then you can build on top of that, split the apps into two, or maybe host the react app on aws s3. Who knows?

Deploy Angular Universal to Shared Hosting without npm or node.js

I currently have access to an standard cPanel shared hosting, without SSH
I have an angular application running there https://www.rednots.com
However now I need the app to have server side rendering for Facebook share, I've been using Universal toolkit from https://github.com/maciejtreder/ng-toolkit and it works great in local
Now my issue is: can I deploy the Universal app the same way I've deployed the Angular client side app by uploading the dist folder? Do I need node.js installed in the server and run commands? Or is it any workaround so I don't need to use commands?
ng-toolkit is using lambda functions and api gateways to be used by the services.
Technically speaking you only need to deploy the dist folder and everything should work out of the box since you mentioned that you already tested it locally and it works which means that the lambda functions are already deployed and the services are pointing to AWS gateway properly.

Deploying React & Node.JS as a service Linux Ubuntu 14

Have a Node.Js API and a React app semi finished. Working on deploying to get the development cycle churning. Currently using npm start for viewing the react server during development. Same for the Node API. When deployed to AWS EC2 I am building in the most basic fashion, npm build pushing to a 'release' folder.
Once the deploy folder is up, I can go into it and run serve -s release
This gets me up and running. I can do the same for api server.
To get the apps running as a service, for the api, I can see how I can build a systemd process and run that with no issue.
For the react app, is there an easy way to run that server as a system... I'm new to this stack, so I might be confused. I have read in some places that once you've built your react app that you need to serve it out via apache or nginx? (e.g. in development it hosts itself, in production, you need to serve it) Is that sort of the general idea - build with local hosting, deploy with a production webhost?
Help appreciated. This is my last major issue before I can get Jenkins running a nice pipeline for deployment. Thanks!
Since you are already running a NodeJs server, It would be a good idea to host your ReactJs App in the NodeJs App itself.
You can pipline in the Jenkins to Build the ReactJs App first and the move it to static serving folder in the server and then you just need to deploy the NodeJs app in which ever environment that you want.

How to deploy nodejs, express, socket.io application

I have worked on a project and its in my local.
I have used express framework with socket and other packages.
I'm new to this and not sure what deployment options we have.
I see some options like AWS, Heroku and etc.
Heroku looks simple.. but at one of the step they are asking to publish to git and clone from there..
I was wondering why do we need to publish to git to deploy it to production.
Currently I have my app in my machine and I run usually by node app.js.
I'm not using any data bases. Can any one guide me how do I go about it?

Resources