feat(api): add /version endpoint and increment version to 0.1.25
This commit is contained in:
@@ -87,6 +87,13 @@ const ApiServer = new Elysia()
|
||||
.group("/api", (app) =>
|
||||
app
|
||||
.use(Utils)
|
||||
.get("/version", async () => {
|
||||
const packageJson = await fs.readFile(
|
||||
path.join(ROOT, "package.json"),
|
||||
"utf-8",
|
||||
);
|
||||
return { version: JSON.parse(packageJson).version };
|
||||
})
|
||||
.use(FileStorage)
|
||||
.use(LandingPage)
|
||||
.use(PPID)
|
||||
|
||||
Reference in New Issue
Block a user