lundi 3 octobre 2016

Transform angular2 app from local NodeJS one to a website

I'm learning Angular 2 - I just finished the official Tour Of Heroes tutorial (http://ift.tt/1ipowaA).

The whole application from the tutorial was built using NodeJS, which, as I understand it, is used to run javascript files. But, what if I want to upload my website to a server (one of the free hostings) to see how it looks like on my other devices (mobile, tablet, etc.)?

Without angular, I wouldn't have problems with that - I'd just use FTP client to upload my .html, .css and .js files to the hosting. But how should I do it with angular2 application? In my project's directory there are folders like: node_modules, typings - they contain a lot of files, and I'm not sure if they are needed. I know that browsers do not support TypeScript (which I'm using), so I should only upload .js files, but how exactly should it be? Which files should I upload?

I tried uploading everything but node_modules and typings folders, but I just got "Loading..." when I tried accessing the website.

I saw this: Hosting Angular 2 app and there people just said to upload every js file, which I did - I uploaded ts files too, just because it was faster to select all files




Aucun commentaire:

Enregistrer un commentaire