Error: ENOENT, stat '/app/public/index.html'
The above is what I get from http://ift.tt/1AK9Lo7
Here's my index.js:
var express = require('express');
var path = require('path');
var app = express();
process.env.PWD = process.cwd();
app.use(express.static(process.env.PWD + '/public'));
app.post('/', function(req, res) { res.sendfile('index.html', { root: './public' }); });
var port = process.env.PORT || 8000;
app.listen(port, function() { console.log('Listening at: ' + port)});
This is my file structure:
-Procfile
-index.js
-node_modules
-package.json
-readme.md
-public
/-index.html
/-css
/-js
Facebook requires us to serve POST to their servers. Anyone have any idea?
Aucun commentaire:
Enregistrer un commentaire