Add ripgrep, fill native fs functions, add ping endpoint (#39)

* Add ripgrep, fill native fs functions, add ping endpoint

* Make show in folder redirect to the workspace
This commit is contained in:
Kyle Carberry
2019-02-27 15:12:26 -06:00
committed by GitHub
parent 3bacbca325
commit 676b30934f
8 changed files with 65 additions and 13 deletions

View File

@ -11,6 +11,7 @@ import * as httpolyglot from "httpolyglot";
import * as https from "https";
import * as mime from "mime-types";
import * as net from "net";
import * as os from "os";
import * as path from "path";
import * as pem from "pem";
import * as util from "util";
@ -168,6 +169,11 @@ export const createApp = async (options: CreateAppOptions): Promise<{
unauthStaticFunc(req, res, next);
}
});
app.get("/ping", (req, res) => {
res.json({
hostname: os.hostname(),
});
});
app.get("/resource/:url(*)", async (req, res) => {
if (!ensureAuthed(req, res)) {
return;