explore-services/portal-4cli-lib
argiro.kokogiannaki 966e47927d remove old meta service - use angular way | change the base url in sitemap, index, properties
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@51840 d315682c-612b-4755-9ff5-7f18f6832af3
2018-04-17 13:51:47 +00:00
..
src remove old meta service - use angular way | change the base url in sitemap, index, properties 2018-04-17 13:51:47 +00:00
.angular-cli.json Adding the portal version that uses the uoa-services-library 2018-01-23 10:07:39 +00:00
README.md Adding the portal version that uses the uoa-services-library 2018-01-23 10:07:39 +00:00
explore-production-properties.json add piwik site id in properties file 2018-04-11 10:20:01 +00:00
installOpenaireLib.sh Adding the portal version that uses the uoa-services-library 2018-01-23 10:07:39 +00:00
package.json add openaire Library as svn external folder | add div help ids in claim components| 2018-02-16 15:51:10 +00:00
prerender.ts Adding the portal version that uses the uoa-services-library 2018-01-23 10:07:39 +00:00
server.ts Adding the portal version that uses the uoa-services-library 2018-01-23 10:07:39 +00:00
static.paths.ts Adding the portal version that uses the uoa-services-library 2018-01-23 10:07:39 +00:00
tsconfig.json Adding the portal version that uses the uoa-services-library 2018-01-23 10:07:39 +00:00
webpack.server.config.js Adding the portal version that uses the uoa-services-library 2018-01-23 10:07:39 +00:00

README.md

Angular Universal & Anguar-CLI minimal starter

This demo is built following the Angular-CLI Wiki guide

We're utilizing packages from the Angular Universal @nguniversal repo, such as ng-module-map-ngfactory-loader to enable Lazy Loading.


Static or Dynamic

This repo demonstrates the use of 2 different forms of Server Side Rendering.

Static Also known as "prerendering"

  • Happens at build time
  • Renders your application and replaces the dist index.html with a version rendered at the route /.

Dynamic

  • Happens at runtime
  • Uses ngExpressEngine to render you application on the fly at the requested url.

Installation

  • npm install or yarn

Development (Client-side only rendering)

  • run npm run start which will start ng serve (project served at the standard: localhost:4200)

Production

Depending on whether you're publishing dynamic or static prerendering, run the build command, and then serve up your dist folder assets.

NOTE: To deploy your Static site to a static hosting platform you will have to deploy the dist/browser folder, rather than the usual dist

ie: npm run build:dynamic or npm run build:static. All of the files that need to be served will be found within the /dist folder.


Testing Universal (dynamic or static) builds -Locally-

Dynamic : npm run start:dynamic

Compiles your application and spins up a Node Express to dynamically serve your Universal application on http://localhost:4000.

Static : npm run start:static

  • Compiles your application and prerenders your applications files, spinning up a demo http-server so you can view it on http://127.0.0.1:8080