From 3f42200223283abd3eb9e0ac84db3240176c00d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=B8jberg?= Date: Sat, 12 May 2012 15:46:19 +0200 Subject: [PATCH 1/2] Added a simple way to run the node app in dev Run `node bin/server --development` to start the app in development mode --- bin/server | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/bin/server b/bin/server index 26c676f..f1ef1b5 100644 --- a/bin/server +++ b/bin/server @@ -1,8 +1,18 @@ #!/usr/bin/env node var connect = require('connect'), - http = require('http'); + http = require('http'), + port = process.env.PORT || 3000, + static; -var app = connect().use(connect.static('public-min', { maxAge: 365 * 24 * 60 * 60 * 1000})); +if (process.argv.indexOf('--development') !== -1) { + console.log('CSS Arrow Please in development on http://localhost:' + port); + static = connect.static('public'); +} +else { + static = connect.static('public-min', { + maxAge: 365 * 24 * 60 * 60 * 1000 + }); +} -http.createServer(app).listen(process.env.PORT || 3000); +http.createServer( connect().use( static ) ).listen( port ); From 22897f04095298a58f36944d308d34800904b5fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=B8jberg?= Date: Sat, 12 May 2012 15:48:22 +0200 Subject: [PATCH 2/2] updated the readme to reflect development --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 5c1b24d..5595316 100644 --- a/README.md +++ b/README.md @@ -2,5 +2,9 @@ Generate the CSS for a tooltip arrow. Check it out at http://cssarrowplease.com +## Contributing +You can simply open the public/index.html file in your browser +or start the development node app (not required): `node bin/server --development` + ## License CSSArrowPlease is Copyright © 2012 Simon Højberg. CSSArrowPlease is free software, and may be redistributed under the terms specified in the LICENSE file.