add simplest possible express server to host files
...this is much better for development, so you can run many different servers that have different HTML 5 local storages for testing purposes.
This commit is contained in:
parent
4ea7a2c785
commit
49dbbe8fa9
3 changed files with 27 additions and 2 deletions
12
app.js
Normal file
12
app.js
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
var express=require("express");
|
||||
var http=require("http");
|
||||
|
||||
var app=express();
|
||||
|
||||
var port = process.env.PORT || 3000;
|
||||
app.set("port", port);
|
||||
app.use(express.static(__dirname));
|
||||
|
||||
app.listen(port, function(){
|
||||
console.log("Listening at: http://localhost:" + port);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue