node.js - is it possible to have multiple modules defined in tsconfig? -


ok, i'm making angular2 app node server. i've followed 5min tutorial i'm using "system" module system. using simple node express server instead of way have in tutorial. writing in typescript well, compiled "system" style of importing modules. , when running server system not defined.

  • how fix system defined when starting server?
  • is not recommended use "system" compiler option "module" in tsconfig-file, when writing node server?
  • can compile server code eg "commonjs" , angular front end "system"?
  • how do configuration of module loading (the small script have in index.html) if not use "system" in front end either?

i recommend split front-end , back-end applications different projects , make them communicate through rest service. mean server application provide service , front application consume using ajax.

this way sure there won't conflict between tools use. example use or not of systemjs. you'll free use systemjs in angular2 application described in 5min tutorial of angular.io website , commonjs node / express application.

the following article describes how that:


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -