Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for running on Nitrous #466

Merged
merged 1 commit into from Mar 24, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,19 @@ npm start
```
go to [http://0.0.0.0:3000](http://0.0.0.0:3000) or [http://localhost:3000](http://localhost:3000) in your browser

# Nitrous Quickstart

You can quickly create a free development environment to get started using this
starter kit in the cloud on [Nitrous](https://www.nitrous.io/):

<a href="https://www.nitrous.io/quickstart?repo=https://github.com/nitrous-io/angular2-webpack-starter">
<img src="https://nitrous-image-icons.s3.amazonaws.com/quickstart.png" alt="Nitrous Quickstart" width=142 height=34>
</a>

Simply run `HOST=0.0.0.0 npm start` from the terminal inside of
`~/code/angular2-webpack-starter` and access your site via the "Preview > 3000"
link in the IDE.

# Table of Contents
* [File Structure](#file-structure)
* [Getting Started](#getting-started)
Expand Down
4 changes: 2 additions & 2 deletions config/webpack.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ const HMR = helpers.hasProcessFlag('hot');
const METADATA = {
title: 'Angular2 Webpack Starter by @gdi2990 from @AngularClass',
baseUrl: '/',
host: 'localhost',
port: 3000,
host: process.env.HOST || 'localhost',
port: process.env.PORT || 3000,
ENV: ENV,
HMR: HMR
};
Expand Down
7 changes: 7 additions & 0 deletions nitrous-post-create.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

echo 'Installing required NPM global packages...'
npm install typings webpack-dev-server rimraf webpack -g --no-progress
echo 'Installing NPM packages...'
npm install --no-progress

5 changes: 5 additions & 0 deletions nitrous.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"template": "nodejs",
"ports": [3000]
}

2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

<% if (webpackConfig.metadata.ENV === 'development') { %>
<!-- Webpack Dev Server reload -->
<script src="http://<%= webpackConfig.metadata.host %>:<%= webpackConfig.metadata.port %>/webpack-dev-server.js"></script>
<script src="/webpack-dev-server.js"></script>
<% } %>

<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
Expand Down