Deploying a Sails.js app to Heroku? - node.js

I have limited experience deploying Node.js apps -- how can I deploy a Sails.js app to Heroku?
I've heroku logined and heroku created my app already.

You should check out this github repo : heroku-sails
It should get you started with sailsjs on heroku
There is a discussion around this particular github repo here on the sails.js google group
These are also resources that can help you get your app running :
Sails Deployment Guide
An answer of sails.js author to the same question

I want to prevent any confusion for those who are familiar to node deployment on heroku. There are a lot of guides to deploying node apps to heroku and a sails app is really no different. If you start a sails app by typing "node app.js" in terminal it will work. Here is the guide put out by Heroku for node apps. The only thing different is that you have a sails rather than a plain vanilla express app.
https://devcenter.heroku.com/articles/getting-started-with-nodejs
I've used this to deploy my sails apps no problem.

First of all create sails js Website or project
then change setting in sails js project as below:
in project config->env->production
//remove from comments
onlyAllowOrigins: [
'https://example.com',
'https://staging.example.com',
],
//remove from comments
trustProxy: true,
then deploy on heroku

Related

How to deploy dist and server side on Heroku correctly?

I am creating a simple customer chat app for my school project using Pusher according to their tutorial.
I want to deploy the app on Heroku so anyone can use this app and connect to it. This app has a client-side (Vue.js app) and a server-side (express) folder.
How can I make it work together by deploying it on Heroku or what have I do?
I have deployed the client-side on Heroku and the front-end works fine.
I also tried to deploy server-side, but it seems it does not communicate with each other.
The server works fine on the localhost, however, I need to make it work globally.
The code can be found in this repository.
Server side settings are in server.js.
I have only changed some front-end stuff, but nothing important yet, so the code is pretty the same.
This is my first Vue.js & server deploying and I was trying several tips and tutorials, but none of them solved this issue.

How to Deploy MERN stack application on heroku

I have made one MERN (i.e-Mongo,Express,React,Node.js) application and wants to deploy on Heroku. I created the react App using create-react-app and folder structure is given below.
React-frontend
---->Node_modules
----->Public
------->src
------->package.json
---------> readme.md
React-backend:
----->Node_modules
------>config
-------->Controller
---------->route
------------>server.js
----------->package.json
Here I have other project for NOde.js and MongoDB operation and its instance (e.g.http://localhost:8888) is called from React-frontend to deal with the database. I need steps to deploy the total application into Heroku.
You'll want to deploy the app using the Heroku Node.js buildpack:
https://github.com/heroku/heroku-buildpack-nodejs
It sounds like you're pretty new to Heroku, so read the README for that repo thoroughly, including the documentation for Getting Started on Heroku with Node.js.
Using Mongo with Heroku will require using one of the several MongoDB add-ons.

Architectural design of a Heroku application with Ember.js, Node.js and Express

I'm starting to implement a Heroku application based on Ember (frontend), Node and Express (backend).
I'm thinking to segregate the frontend and the backend in different apps. Both apps will be secured by Auth0.
What do you think about it? I'm on the right way?
Yes, I think you're going about it the right way. My company has a Ruby on Rails backend and EmberJS frontend. We have the backend as one heroku app, and the frontend as another heroku app. For ember, we use Ember CLI Deploy to deploy to production on Heroku.
Yes, that’s generally the preferred way to build Ember apps. We built the api viewer in this manner to have a reference app that works on Heroku with Fastboot that people could look at: https://github.com/ember-learn/ember-api-docs

Where can i upload an Express application on webserver?

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.

Convert an AngularJS app into a "standard" Node.js app to be friendly deployment of Node.js Hosting

Sorry my question is Novice, but I wont to do that in order to be an AngularJS APP friendly of deployment of any Node.js Hosting.
I found something like that by Meteor: "https://github.com/onmodulus/demeteorizer" but i can't found by AngularJS.
Or some way to build with Grunt, for instance: "grunt build node-js" and the "dist" folder containt all the files need to deploy in any NodeJS Hosting like CloudBees.
It is possible something like that?
thanks a lot!
Jero
PD: I do not want to deploy my Angular APP in Heroku.
Your question is very unclear, but if you are looking to develop with Angular and node, consider http://meanjs.org/, it is a full-featured stack for precisely this application.
You also have other. MVC frameworks such as sails.js and gedddy.js, or the more barebones express.js

Resources