Skip to content

Commit 8243208

Browse files
author
Allison Weins
committed
Adding project files
0 parents  commit 8243208

17 files changed

+7529
-0
lines changed

.gitignore

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
6+
# Runtime data
7+
pids
8+
*.pid
9+
*.seed
10+
11+
# Directory for instrumented libs generated by jscoverage/JSCover
12+
lib-cov
13+
14+
# Coverage directory used by tools like istanbul
15+
coverage
16+
17+
# nyc test coverage
18+
.nyc_output
19+
20+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
21+
.grunt
22+
23+
# node-waf configuration
24+
.lock-wscript
25+
26+
# Compiled binary addons (http://nodejs.org/api/addons.html)
27+
build/Release
28+
29+
# Dependency directories
30+
node_modules
31+
jspm_packages
32+
33+
# Optional npm cache directory
34+
.npm
35+
36+
# Optional REPL history
37+
.node_repl_history

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) Microsoft Corporation. All rights reserved.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
# Haikus for Codespaces
3+
4+
This is a quick node project for demoing Codespaces. It is based off of the [Azure node sample](https://github.com/Azure-Samples/nodejs-docs-hello-world). It's great!!!

gulpfile.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
const gulp = require('gulp');
2+
const imagemin = require('gulp-imagemin');
3+
4+
exports.default = () => (
5+
gulp.src('./raw_images/*')
6+
.pipe(imagemin())
7+
.pipe(gulp.dest('./public/images'))
8+
);

haikus.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[
2+
{
3+
"text": "rain in seattle,\ndon't forget an umbrella,\nor it will be gloom",
4+
"image": "puddle_jumper_octodex.jpg"
5+
},
6+
{
7+
"text": "my tunes on repeat,\nit's time for me to dj,\nhave you heard this one?",
8+
"image": "vinyltocat.jpeg"
9+
},
10+
{
11+
"text": "snow is still falling,\nis it time for apres yet?\nlet's do one more run",
12+
"image": "snowtocat_final.jpg"
13+
},
14+
{
15+
"text": "beep boop bop beep boop,\ni am robot octocat,\ni think there's a bug",
16+
"image": "Robotocat.jpeg"
17+
},
18+
{
19+
"text": "same plot as before,\nso why is it still awesome?\ni think it's the hat",
20+
"image": "linktocat.jpg"
21+
}
22+
]

index.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
let express = require('express');
2+
let app = express();
3+
let ejs = require('ejs');
4+
const haikus = require('./haikus.json');
5+
const port = process.env.PORT || 3000;
6+
7+
app.use(express.static('public'))
8+
app.set('view engine', 'ejs');
9+
10+
app.get('/', (req, res) => {
11+
res.render('index', {haikus: haikus});
12+
});
13+
14+
app.listen(port);

0 commit comments

Comments
 (0)