Skip to content

Commit

Permalink
fix(serve): communicate that ng serve is not secure. (#3646)
Browse files Browse the repository at this point in the history
People are using it in production environment and should not.
  • Loading branch information
hansl authored Dec 21, 2016
1 parent db4e024 commit 766394d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/angular-cli/tasks/serve-webpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { ServeTaskOptions } from '../commands/serve';
import { CliConfig } from '../models/config';
import { oneLine } from 'common-tags';
import * as url from 'url';
import {stripIndents} from 'common-tags';
const opn = require('opn');

export default Task.extend({
Expand Down Expand Up @@ -109,6 +110,17 @@ export default Task.extend({

webpackDevServerConfiguration.hot = serveTaskOptions.hmr;

if (serveTaskOptions.target === 'production') {
ui.writeLine(chalk.red(stripIndents`
****************************************************************************************
This is a simple server for use in testing or debugging Angular applications locally.
It hasn't been reviewed for security issues.
DON'T USE IT FOR PRODUCTION USE!
****************************************************************************************
`));
}

ui.writeLine(chalk.green(oneLine`
**
NG Live Development Server is running on
Expand Down

0 comments on commit 766394d

Please sign in to comment.