@joystick.js/node-canary 0.0.0-canary.49 → 0.0.0-canary.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/index.js +8 -0
- package/package.json +1 -1
package/dist/app/index.js
CHANGED
|
@@ -53,6 +53,7 @@ class App {
|
|
|
53
53
|
this.initWebsockets(options?.websockets || {});
|
|
54
54
|
this.initDevelopmentRoutes();
|
|
55
55
|
this.initAccounts();
|
|
56
|
+
this.initTests();
|
|
56
57
|
this.initDeploy();
|
|
57
58
|
this.initAPI(options?.api);
|
|
58
59
|
this.initRoutes(options?.routes);
|
|
@@ -158,6 +159,13 @@ class App {
|
|
|
158
159
|
fs.writeFileSync("./.joystick/PROCESS_ID", `${generateId(32)}`);
|
|
159
160
|
}
|
|
160
161
|
}
|
|
162
|
+
initTests() {
|
|
163
|
+
if (process.env.NODE_ENV === "test") {
|
|
164
|
+
this.express.app.get("/api/_test/bootstrap", async (req, res) => {
|
|
165
|
+
res.status(200).send({ ping: "pong" });
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
}
|
|
161
169
|
initDeploy() {
|
|
162
170
|
if (process.env.NODE_ENV === "production" && process.env.IS_PUSH_DEPLOYED) {
|
|
163
171
|
this.express.app.get("/api/_push/pre-version", async (req, res) => {
|