Skip to content
Open

Sass #102

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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
**/*.sw?
**/node_modules
**/db
DS_Store
Binary file added robin_stringer/.DS_Store
Binary file not shown.
5 changes: 5 additions & 0 deletions robin_stringer/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
**/*.sw?
**/node_modules
**/db
bundle/**
.DS_Store
2 changes: 2 additions & 0 deletions robin_stringer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Achilles
App to tally miles run by schoolkids participating in a 'virtual marathon' program, with the goal of completing 26.2 miles of walking, running or rolling during the academic year.
28 changes: 28 additions & 0 deletions robin_stringer/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
'use strict';
var http = require('http');
var mongoose = require('mongoose');
var express = require('express');
var posts = require(__dirname + '/db/posts.json');
var kidsRouter = require(__dirname + '/routes/kidsroutes');
var app = express();

mongoose.connect(process.env.MONGOLAB_URI || 'mongodb://localhost/kids_dev');

app.use(express.static(__dirname + '/build'));

app.use('/api', kidsRouter);

app.get('/kids/:title?', function(req, res){
var title = req.params.title;
if (title === undefined) {
res.status(503);
res.send("This page is under construction!");
} else {
var post = posts[title] || {};
res.render('post', {post: post});
}
});

app.listen(process.env.PORT || 3000, function() {
console.log('The frontend server is running on port 3000!');
});
Binary file added robin_stringer/app/.DS_Store
Binary file not shown.
Loading