From 6783c7b5b6894351d9e98ac2d1307de9fbcf181f Mon Sep 17 00:00:00 2001 From: Yvonne Yip Date: Fri, 20 Sep 2013 17:47:38 -0700 Subject: [PATCH] wip --- yvonne/getting-started/components/gs-app.html | 70 +++++++++++++++++++ .../components/gs-import-selector.html | 47 +++++++++++++ yvonne/getting-started/index.html | 10 +++ yvonne/getting-started/index.js | 3 + yvonne/getting-started/lib/server.js | 31 ++++++++ yvonne/getting-started/package.json | 8 +++ 6 files changed, 169 insertions(+) create mode 100644 yvonne/getting-started/components/gs-app.html create mode 100644 yvonne/getting-started/components/gs-import-selector.html create mode 100644 yvonne/getting-started/index.html create mode 100755 yvonne/getting-started/index.js create mode 100644 yvonne/getting-started/lib/server.js create mode 100644 yvonne/getting-started/package.json diff --git a/yvonne/getting-started/components/gs-app.html b/yvonne/getting-started/components/gs-app.html new file mode 100644 index 0000000..0715fdc --- /dev/null +++ b/yvonne/getting-started/components/gs-app.html @@ -0,0 +1,70 @@ + + + + + + + diff --git a/yvonne/getting-started/components/gs-import-selector.html b/yvonne/getting-started/components/gs-import-selector.html new file mode 100644 index 0000000..3e1711c --- /dev/null +++ b/yvonne/getting-started/components/gs-import-selector.html @@ -0,0 +1,47 @@ + + + + + diff --git a/yvonne/getting-started/index.html b/yvonne/getting-started/index.html new file mode 100644 index 0000000..a1e90b5 --- /dev/null +++ b/yvonne/getting-started/index.html @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/yvonne/getting-started/index.js b/yvonne/getting-started/index.js new file mode 100755 index 0000000..5db44dc --- /dev/null +++ b/yvonne/getting-started/index.js @@ -0,0 +1,3 @@ +#!/usr/bin/env node + +var server = require('./lib/server'); diff --git a/yvonne/getting-started/lib/server.js b/yvonne/getting-started/lib/server.js new file mode 100644 index 0000000..f7b76b4 --- /dev/null +++ b/yvonne/getting-started/lib/server.js @@ -0,0 +1,31 @@ +var port = 8888; +var project_dir = __dirname + '/../'; +var root_dir = __dirname + '/../../../../'; + +var express = require('express'); + +var app = express(); +app.use(express.bodyParser()); + +app.get('/', function(req, res) { + res.sendfile('index.html', {root: project_dir}); +}); + +app.get('/components/*', function(req, res) { + res.sendfile(req.params[0], {root: project_dir + 'components/'}); +}); + +app.get('/polymer/*', function(req, res) { + res.sendfile(req.params[0], {root: root_dir}); +}); + +app.get('/polymer-elements/*', function(req, res) { + res.sendfile(req.params[0], {root: root_dir + 'polymer-elements/'}); +}); + +app.get('/polymer-ui-elements/*', function(req, res) { + res.sendfile(req.params[0], {root: root_dir + 'polymer-ui-elements/'}); +}); + +app.listen(port); +console.log('Listening on port ' + port); diff --git a/yvonne/getting-started/package.json b/yvonne/getting-started/package.json new file mode 100644 index 0000000..569c3f5 --- /dev/null +++ b/yvonne/getting-started/package.json @@ -0,0 +1,8 @@ +{ + "name": "getting-started", + "description": "Polymer bootstrap app", + "version": "0.0.1", + "dependencies": { + "express": "3.x" + } +} \ No newline at end of file