瀏覽代碼

Merge pull request #62 from mrsmuneton/master

Example for serving files from parse/public directory like a domain.parseapp.com webapp.
Fosco Marotto 9 年之前
父節點
當前提交
eadf4b1990
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      index.js

+ 4 - 0
index.js

@@ -35,6 +35,10 @@ app.use(mountPath, api);
 app.get('/', function(req, res) {
   res.status(200).send('I dream of being a web site.');
 });
+ // If you are migrating a webapp hosted on domain.parseapp.com:
+ // Remove statement above serving the 200 status (app.get('/ function()});
+ // Uncomment app.use below and set the absolute path for serving files in the /public dir
+ // app.use(express.static(__dirname + '/public'));
 
 app.get('/test', function(req, res) {
   res.sendFile(path.join(__dirname, '/public/test.html'));