I've spent whole day and without success. I've tried Heroku with https://github.com/jordansissel/heroku-buildpack-meteor, but it gives an error and logs doesn't give any good info. I want a free service with the ability to scale once the app gets more traffic. I just want to write as few lines as possible, or just drop a bundle. It shouldn't be so difficult. Thank you.
IMO The easiest way to deploy meteor app for production is to use meteor-up and your own server (DigitalOcean, Linode,...) .
meteor-up setups server for you (install nodejs, mongodb, etc) and give you easy way to deploy:
mup deploy
You can have server good enough for start for only 5 $/month.
It doesn’t get much simpler than meteor deploy.
$ meteor deploy myapp.meteor.com
Where myapp is a not-taken subdomain of your choice.
From the documentation:
You can also deploy to your own domain. Just set up the hostname you want to use as a CNAME to origin.meteor.com, then deploy to that name.
$ meteor deploy www.myapp.com
If you want scalable, it's not going to be free (to my knowlege). But you can use AWS, linode, or pretty much any of the cloud services. Just install meteor on your host, and run this command from the project directory:
$ cd my_project_directory && meteor
If you want it to run in the background:
$ cd my_project_directory && meteor &>.log &
$ disown %1 // or whatever job number meteor runs as.
I made a few tutorial vids for using Meteor Up with Amazon EC2. You can start out with the free EC2 Micro Tier.
Setting up EC2
https://www.youtube.com/watch?v=OXdPdSekVtg&list=UUs2gDoWu9gHHR0aOklT3nvg
EC2 SSH
https://www.youtube.com/watch?v=K-IRgEge6jA&list=UUs2gDoWu9gHHR0aOklT3nvg
Meteor Deployment onto EC2
https://www.youtube.com/watch?v=Lyyh2fkXovo&list=UUs2gDoWu9gHHR0aOklT3nvg
It seems an old question by now but in case anybody stumbles upon here,
after I made my research and tried lots of different things, I ended up with the process below which includes amazing phusion passenger and I'm doing it for many projects of mine so far.
1 - Install meteor on server by doing
curl https://install.meteor.com/ | sh
2 - Install Phusion Passenger by following the documents here
3 - Build your app locally (it is important to add meteor packages)
4 - Delete .meteor/local/build and .meteor/local/cordova-build (don't delete db if you want to keep your local db)
5 - Using ftp, create a folder on your server and upload all the files including .meteor folder
6 - Run phusion passenger standalone by doing
sudo -E passenger start --port 80 --user root --environment production --daemonize --sticky-sessions
Of course, you should change the variables before doing that. You can use the last 4 steps for every app you have. If you want to publish a cordova app just use your domain with selected port instead of yourapp.meteor.com
Since meteor is reloading itself automatically until you say not to, you can just upload the new client files to server and wait the reload when you want to make a quick change. If the change is on the server, stop the passenger with
passenger stop --port 80
upload your files and run passenger again.
I hope this helps someone out there.
Best
Related
It's my first time I'm trying to do that.
I'd like to set up config file in circle.ci in order to deploy my React app to expternal server. Before I just used Ftp connection to upload files to the production server. But now I'd like to do that authomatically. So in my circle config file I've already configured steps to run yarn install and yarn build, all is just doing fine, but the last step needs to be done, I basically have no knowledge how to connect it all, ie. files comes from github, then they are used for build purpose by circle.ci, then I'd like to deploy it to the production server. What is the flow here, and what should I use (ssh somehow, but how?). Thanks
If you're hosting provider supports it, I would suggest using rsync over FTP since it will ensure files are replicated without needing to upload everything, only changes. The --delete option will al\so remove extraneous files on the webhost that you may have removed from github.
- run:
name: Deploy public folder to YOURDOMAIN
command: |
rsync -avz --delete /local/path/ USERNAME#HOSTNAME:/Path/on/remote/server/
if yo have not made any changes to default CIrcleCI images, your local path is likely /home/circleci/project/
I've created a REST API using Node.js and Express, so now I need to share it and publish it on a server in order to connect from Front-end.
Can you tell me a proper way to do it?
You could use Heroku for deployment, this way you can know how your app will fare. It's free moreover.
If you're satisfied with it then you can go ahead and buy a dyno or use other platforms like Azure or AWS.
To learn more on how to deploy your existing app to Heroku, visit this page.
The question you are asking is very broad. It can be done in a lot of ways. For me this 2 part tutorial was very helpful:
https://hackernoon.com/tutorial-creating-and-managing-a-node-js-server-on-aws-part-1-d67367ac5171. However, this only covers the installation on AWS EC2. This doesn't differ much from deploying it to Google Cloud, Azure or something local.
In general you need to fix the following steps:
1) Create a server somewhere (local or in the cloud)
2) Install all the stuff to run your app. In your case Node.js at least
3) Put a copy of your app on the server
4) Run it with node
5) Go to the ip of the server
The tutorial gives more details. DISCLAIMER: If you actually want to use this in production there is way more to consider. For example, security policies, setting up proxies, installing certificates etc. Please read up on that properly before you start running production apps.
You can install node on the the production server and then where the project is situated just .
copy that path
Open the Cmd >>
Enter "cd copied path .>>enter
you npm will be install & REST Api will Work.
I want deploy a Meteor application on a wago industrial PLC 750-8202.
Wago supports Boards Support Package with the PTXdist tooling support (Communicate with CoDeSys program on a Linux-based WAGO PFC200 PLC).
I have no idea how i can utilize meteor on such a platform.
Have you any ideas how the steps can be realized to add meteor support for wago plcs ?
It is has linux on it, just SSH to your PLC. Make sure it is connected to your local network.
Now you can install node and everything else. It is like you have your own VPS. Configure everything. You can even install ftp server and upload your files over FTP. Or create small script that will be triggered from Github hooks and update your PLC as soon as you push changes to master branch.
I've made a real time chat application with node and socket io and it is running well in my local machine. But its time to run it on my live windows server. I can't understand to how set it up there. Do I need to upload the files to the server or I've to install node js and npm modules in the server and then upload the files. And how I can do these? How I'll run the command prompt as we do in local machine like node chat.js ? Any help is appreciated.
Thanks in advance.
You can use a deployment client like Capistrano or you can just upload your source files then run npm install (assuming your have node installed) followed by your commands to bring up the server. I'd suggest using a framework like meteor or sails to make deployment easier. Or using a cloud solution like heroku.
You can use Jenkins for deploying your app to server. Running bash commands and setting builds are much more easier.
Keep it simple:
Download and install NodeJS, NPM (here)
You need to establish a simple way to move your files to the remote server. Since you can run your code and do the development at your local machine, I recommend you to use github for this purpose. Set up a repository and clone it at your remote server. Then, you can always push and pull your changes using git.
You need to establish a simple way to run your code at the remote server. Since you use Windows, I recommend you to create a .bat file that does all the preparations and runs your code. In the simplest case, it would contain node path\to\project\chat.js. Then, run this file using a console. If you're going to use github, you probably should include this .bat file to your repository.
Good luck!
I am about to deploy my first client facing application built on Meteor JS. My client has a website - www.samplewebsite.com and I want to add my application's routes to that site so it would be www.samplewebsite.com/admin, www.samplewebsite.com/store, etc. instead of www.newapplication.meteor.com. I plan on using Heroku to host the application. Can someone point me to where I can find more information on how to do this? I apologize if the question is unclear since I am still learning the technical syntax.
Thank you.
You can use the meteor buildpack from https://github.com/jordansissel/heroku-buildpack-meteor
Do this in your meteor app's directory on your local machine:
Create a git commit
git init
git add .
git commit -m "Initial commit"
Create an instance:
heroku create --buildpack https://github.com/jordansissel/heroku-buildpack-meteor.git
Configure your app:
heroku addons:create mongolab:sandbox
heroku config:add MONGO_URL=<insert_value_of_MONGOLAB_URI_here>
heroku config:add ROOT_URL=<insert_url_created_above_here>
Then deploy it to heroku:
git push heroku
From this point you can use the guide here: https://devcenter.heroku.com/articles/custom-domains to set up your domain to match the heroku instance.
This way you can now use your own domain for your app.
Take a look at MUP. Its a command line tool and allows for very easy deployments.