Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Sending contents of index.html

  • Loading branch information...
commit 4017305b1af3151134cef0dca03c31109507f2e8 1 parent e4bddaa
@jest authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 web.js
View
4 web.js
@@ -1,9 +1,11 @@
var express = require('express');
+var fs = require('fs');
var app = express.createServer(express.logger());
app.get('/', function(request, response) {
- response.send('Hello World 2!');
+ Buffer buf = fs.readFileSync('index.html');
+ response.send(buf.toString());
});
var port = process.env.PORT || 5000;
Please sign in to comment.
Something went wrong with that request. Please try again.