@unsetsoft/ryunixjs 0.2.37-nightly.15 → 0.2.37-nightly.16
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/package.json +1 -1
- package/server/index.js +0 -18
package/package.json
CHANGED
package/server/index.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import express, { Router } from "express";
|
|
2
|
-
import cors from "cors";
|
|
3
|
-
const app = express();
|
|
4
|
-
const api = Router();
|
|
5
|
-
import config from "../utils/config.cjs";
|
|
6
|
-
app.use(express.json());
|
|
7
|
-
app.use(express.static(`../${config.buildDirectory}`));
|
|
8
|
-
app.use(express.urlencoded({ extended: true }));
|
|
9
|
-
|
|
10
|
-
const useCors = (config = {}) => app.use(cors(config));
|
|
11
|
-
const init = (port = 3001) =>
|
|
12
|
-
app.listen(port, () => {
|
|
13
|
-
console.log("Server is runing at: https://localhost:" + port);
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
app.use("/api/", api);
|
|
17
|
-
|
|
18
|
-
export { useCors, api, init };
|