Looking to integrate ember.js into an existing Node.js application?

From what I’ve seen ember-cli seems to kind of build the project for you. I am an absolute beginner in using ember but love the outlook and quite frankly prefer it to using, say, the main competitor’s framework.

Any tutorials online to integrating ember to an existing node project? Do I just npm install ember and I go off to the races? Help?

Node.js is used on the backend. Ember is used in your browser.

You could clone my Bloggr example to start somewhere. https://github.com/broerse/ember-cli-blog

Yes go off to the races :motorcycle:

Well here’s my app:

Do I start by installing ember as an npm package and go from there or something? Something like npm install ember? There seems to be a huge overlap in my existing app and what ember seems to want to give me. Can I still use require vs import?

I have to admit I’m a little lost here. Can you give me the main strokes of what I have to do?

Yes install Ember with npm install -g ember-cli and npm install -g bower and npm install -g phantomjs-prebuilt

Than run ember new ember-from-scratch

In the ember-from-scratch folder run ember s

Navigate to http://localhost:4200

When you habe your Ember frontend running you must use jsonapi or some other adapter like ember-pouch to talk to your node.js backend. See also:


So am I creating the ember project within my node project? So that the structure is node-from-scratch/ember-from-scratch? Will I be running both the ember server and the node server in parallel? My node app is running on 8080, why do I have to navigate to a different port?

It seems that I don’t understand you. You just need to host the files created with ember build --env production generated in the dist folder. This can be done by your node.js app on port 8080.

My code is currently live at https://ide.c9.io/burtonium/node-from-scratch

I made a client folder with an ember-app folder within it, is this the correct structure? will the node server not conflict with my node app? Do I have to change the port of my node app to a different private port and have my ember app communicate with it there? There seems to be a conflict with babel as this error seems to indicate:

File: modules/ember-inflector/index.js The Broccoli Plugin: [Babel] failed with: ReferenceError: [BABEL] modules/ember-inflector/index.js: Unknown option: /home/ubuntu/workspace/package.json.presets