mirror of
https://github.com/kou029w/http-echo.git
synced 2025-01-18 08:05:06 +00:00
rename to echo
This commit is contained in:
parent
0b9083509b
commit
a36718e901
3 changed files with 5 additions and 3 deletions
6
index.js
6
index.js
|
@ -29,6 +29,8 @@ app.use(express.urlencoded({ extended: false }));
|
||||||
app.use(express.raw({ type: "*/*" }));
|
app.use(express.raw({ type: "*/*" }));
|
||||||
app.set("json spaces", 2);
|
app.set("json spaces", 2);
|
||||||
app.all("/basic-auth", passport.authenticate("basic", { session: false }));
|
app.all("/basic-auth", passport.authenticate("basic", { session: false }));
|
||||||
app.all("/*", require("./api/app.js"));
|
app.all("/*", require("./api/echo.js"));
|
||||||
|
|
||||||
app.listen(process.env.PORT || 8080);
|
if (require.main === module) app.listen(process.env.PORT || 8080);
|
||||||
|
|
||||||
|
module.exports = app;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
"version": 2,
|
"version": 2,
|
||||||
"routes": [{ "src": "/.*", "dest": "/api/app.js" }]
|
"routes": [{ "src": "/.*", "dest": "/api/echo.js" }]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue