Express.JS AND Ember.JS working together? -
i work express.js (and pug views).
now i've stumbled upon ember.js , starting it.
is there way of connecting them?
i mean need mix them somehow?
thanks, folks.
this rather broad question , can (most likely) lead opinionated answers, i'll try remain on track.
these tools serve different purpose, see 3 cases can used together. there might other cases, mileage may vary.
express used serve ember assets through views
this case use express backend server. if need serve ember application using server logic, 1 way go.
example, may want have authentication part done express (e.g. not ember), let's restrict access parts of express application: assets, pages, or ember application.
and end rendering dynamic templates script
tag sourcing static ember application.
any other combination of language/server works here, choosing express matter of taste.
your ember application consumes api
again, assume write api using javascript, , want serve using express. matter of personal taste.
you want use server-side rendering ember application
this case use express, wether want or not.
server-side rendering ember application done fastboot
, used ember-cli-fastboot
, has dependency
(not devdependency
) express (see ember-cli-fastboot package.json file).
if don't know fastboot, suggest watch this introduction video.
conclusion
you don't need mix these tools, there various ways of using ember in conjunction express.
case have use express if use ember-cli-fastboot.
Comments
Post a Comment