1

I looking into Angular universal and trying to get my head around deployment. Github https://github.com/angular/universal-starter

It has Angular 2 Universal + TypeScript 2 + Webpack 2

When I run the command

npm run build

I get the following structure

**Client**
0.bundle
0.bundle.js.map
main.bundle
main.bundle.js.map

**Server**
0.index
0.index.js.map
index
index.js.map

How do I deploy this to a server?

1 Answer 1

0

Install dependencies

Run npm install in your terminal at the root of universal-starter

Run the NodeJS backend

Run npm run build:ssr && npm run serve:ssr after npm install has finished, this will host a local nodejs server here: http://localhost:4000 (you can put that in your browser)

Before either of these steps ensure you have NodeJS and NPM installed (NPM comes with the newer builds of NodeJS)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.