2019-06-03 09:47:07 +00:00
|
|
|
"use strict";
|
2018-07-03 09:25:12 +00:00
|
|
|
|
2019-06-03 09:47:07 +00:00
|
|
|
var express = require("express");
|
2018-07-03 09:25:12 +00:00
|
|
|
var app = express();
|
|
|
|
|
2019-06-03 09:47:07 +00:00
|
|
|
app.use("/", function(req, res) {
|
|
|
|
res.setHeader("Content-Type", "text/html; charset=utf-8");
|
|
|
|
res.end("Hello, World!\n\n💚 🔒.js");
|
2018-07-03 09:25:12 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
// DO NOT DO app.listen() unless we're testing this directly
|
2019-06-03 09:47:07 +00:00
|
|
|
if (require.main === module) {
|
|
|
|
app.listen(3000);
|
|
|
|
}
|
2018-07-03 09:25:12 +00:00
|
|
|
|
|
|
|
// Instead do export the app:
|
|
|
|
module.exports = app;
|