monoverse 0.0.4 → 0.0.5
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/cli.js +22 -0
- package/package.json +6 -5
- package/build/cli.js +0 -96049
package/cli.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const path = require("path");
|
|
4
|
+
const http = require("http");
|
|
5
|
+
const express = require("express");
|
|
6
|
+
const openLink = require("open");
|
|
7
|
+
|
|
8
|
+
const { createRequestHandler } = require("@remix-run/express");
|
|
9
|
+
const app = express();
|
|
10
|
+
|
|
11
|
+
const server = http.createServer(app).listen(() => {
|
|
12
|
+
const port = server.address().port;
|
|
13
|
+
const build = require("./build");
|
|
14
|
+
const staticPath = path.resolve(__dirname, "./public");
|
|
15
|
+
|
|
16
|
+
app.use(express.static(staticPath));
|
|
17
|
+
|
|
18
|
+
app.all("*", createRequestHandler({ build }));
|
|
19
|
+
app.set("port", port);
|
|
20
|
+
console.log(`Started at http://localhost:${port}`);
|
|
21
|
+
openLink(`http://localhost:${port}`);
|
|
22
|
+
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "monoverse",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.5",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Kishore",
|
|
@@ -9,10 +9,11 @@
|
|
|
9
9
|
"url": "https://kishore.app"
|
|
10
10
|
},
|
|
11
11
|
"type": "commonjs",
|
|
12
|
-
"bin": "
|
|
12
|
+
"bin": "cli.js",
|
|
13
13
|
"files": [
|
|
14
14
|
"build/**",
|
|
15
|
-
"public/**"
|
|
15
|
+
"public/**",
|
|
16
|
+
"cli.js"
|
|
16
17
|
],
|
|
17
18
|
"dependencies": {
|
|
18
19
|
"@remix-run/express": "^1.19.0",
|
|
@@ -54,9 +55,9 @@
|
|
|
54
55
|
},
|
|
55
56
|
"scripts": {
|
|
56
57
|
"depcheck": "npx depcheck",
|
|
57
|
-
"package:build": "run-s build:remix
|
|
58
|
+
"package:build": "run-s build:remix",
|
|
59
|
+
"build": "run-s build:remix",
|
|
58
60
|
"build:remix": "cross-env NODE_ENV=production remix build",
|
|
59
|
-
"build:cli": "esbuild cli.ts --platform=node --bundle --outfile=build/cli.js",
|
|
60
61
|
"start": "cross-env NODE_ENV=production remix-serve build",
|
|
61
62
|
"lint": "run-p lint:*",
|
|
62
63
|
"lint:tsc": "tsc --noEmit",
|