New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@ngx-utils/express-engine

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ngx-utils/express-engine

Engine for server rendering Angular apps

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@ngx-utils/express-engine

npm version npm downloads

Engine for server rendering Angular apps

Table of contents:

Prerequisites

This package depends on @angular v4.0.0 and express.

Install express from npm:

npm install express --save

Installation

Install @ngx-utils/express-engine from npm:

npm install @ngx-utils/express-engine --save

Example of usage

Simple exapmle of express server using @ngx-utils/express-engine:

import 'zone.js/dist/zone-node';
import 'reflect-metadata';
import * as express from 'express';
import { enableProdMode } from '@angular/core';
import { ngExpressEngine } from '@ngx-utils/express-engine';

import { ServerAppModuleNgFactory } from './ngfactory/server.module.ngfactory';
import { environment } from './environments/environment';

const app = express();

enableProdMode();

app.engine('html', ngExpressEngine({
  aot: true,
  bootstrap: ServerAppModuleNgFactory
}));

app.set('view engine', 'html');
app.set('views', 'dist/client');

app.get('*', (req, res) => {
  res.render('../client/index', {cache: true, req, res});
});

app.listen(environment.port);

License

The MIT License (MIT)

Keywords

FAQs

Package last updated on 25 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc