Skip to content

Commit

Permalink
Merge pull request #466 from nitrous-io/master
Browse files Browse the repository at this point in the history
Add support for running on Nitrous
  • Loading branch information
PatrickJS committed Mar 24, 2016
2 parents 0b78ee4 + 275dda0 commit 0726d91
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 3 deletions.
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

0 comments on commit 0726d91

Please sign in to comment.