Skip to content
Open
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
@@ -0,0 +1 @@
node_modules
12 changes: 12 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = function(grunt){
grunt.initConfig({
watch: {
files: ["**/*.*"],
options: {
livereload: true
}
}
});

grunt.loadNpmTasks('grunt-contrib-watch');
}
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# HTML5-Centipede
The arcade game Centipede we know and love but rewritten in HTML5.
The arcade game Centipede we know and love but rewritten in HTML5.
Game engine: Phaser. Check them out. Cool stuff, great community.

This is the first in my mission to revitalize a few classic arcade games.

## Running
1. npm install
2. npm start

Optionally run grunt watch for livereload
25 changes: 25 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "centipede",
"version": "0.0.0",
"description": "The arcade game Centipede we know and love but rewritten in HTML5. Game engine: Phaser. Check them out. Cool stuff, great community.",
"main": "server.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node server.js"
},
"repository": {
"type": "git",
"url": "https://github.com/rkram5424/HTML5-Centipede"
},
"author": "Ryan Kramlich <rkram5424@gmail.com>",
"license": "ISC",
"bugs": {
"url": "https://github.com/rkram5424/HTML5-Centipede/issues"
},
"homepage": "https://github.com/manufacturedba/HTML5-Centipede",
"devDependencies": {
"restify": "~2.8.5",
"grunt-contrib-watch": "~0.6.1",
"grunt": "~0.4.5"
}
}
22 changes: 22 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
var fs = require('fs');
var restify = require('restify');
var server = restify.createServer();

server.get(/.*/, restify.serveStatic({
directory: __dirname,
default: 'index.html'
}));

server.get('/', function(req, res, done){
fs.readFile('index.html', 'utf8', function(err, html){
if(err) throw err;
res.setHeader('Content-type', 'text/html');
res.write(html);
res.end();
return done();
});
});

server.listen(8080, function(){
console.log('Listening at ' + server.url);
});