@@ -177,7 +177,23 @@
});
-
AssetFlow Alpha V0.0.1
+
AssetFlow Alpha No version info
+
diff --git a/src/routes/api/v1/version.ts b/src/routes/api/v1/version.ts
new file mode 100644
index 0000000..4e75092
--- /dev/null
+++ b/src/routes/api/v1/version.ts
@@ -0,0 +1,10 @@
+import express, { Request, Response } from 'express';
+
+function get(req: Request, res: Response) {
+ const revision = require('child_process')
+ .execSync('git rev-parse --short HEAD')
+ .toString().trim()
+ res.status(200).send({ version: '1.0.0', commit: revision });
+};
+
+export default { get };