mirror of
https://github.com/spacebarchat/server.git
synced 2026-08-28 11:44:07 +00:00
🐛 fix dependencies and build for bundle
This commit is contained in:
Generated
BIN
Binary file not shown.
+9
-8
@@ -4,9 +4,12 @@
|
||||
"description": "",
|
||||
"main": "src/start.js",
|
||||
"scripts": {
|
||||
"linkInstall": "npm run --prefix ../util/ link && npm run --prefix ../api/ link && npm run --prefix ../cdn/ link && npm run --prefix ../gateway/ link",
|
||||
"postinstall": "npm run linkInstall && npm link @fosscord/util && npm link @fosscord/api && npm link @fosscord/gateway && npm link @fosscord/cdn",
|
||||
"build": "tsc -b .",
|
||||
"postinstall": "cd ../api/ && npm i && cd ../cdn/ && npm i && cd ../gateway/ && npm i && ",
|
||||
"build": "npm run build:api && npm run build:cdn && npm run build:gateway && npm run build:bundle",
|
||||
"build:bundle": "tsc -b .",
|
||||
"build:api": "cd ../api/ && npm run build",
|
||||
"build:cdn": "cd ../cdn/ && npm run build",
|
||||
"build:gateway": "cd ../gateway/ && npm run build",
|
||||
"start": "npm run build && node dist/start.js",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
@@ -21,14 +24,12 @@
|
||||
"url": "https://github.com/fosscord/fosscord-server/issues"
|
||||
},
|
||||
"homepage": "https://fosscord.com",
|
||||
"devDependencies": {
|
||||
"dependencies": {
|
||||
"@types/async-exit-hook": "^2.0.0",
|
||||
"@types/express": "^4.17.13",
|
||||
"@types/node": "^16.6.1",
|
||||
"@types/node-os-utils": "^1.2.0",
|
||||
"typescript": "^4.3.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"typescript": "^4.3.5",
|
||||
"@types/node": "^16.6.1",
|
||||
"@fosscord/api": "file:../api",
|
||||
"@fosscord/cdn": "file:../cdn",
|
||||
"@fosscord/gateway": "file:../gateway",
|
||||
|
||||
@@ -22,12 +22,14 @@ const cdn = new CDNServer({ server, port, production, app });
|
||||
const gateway = new GatewayServer({ server, port, production });
|
||||
|
||||
async function main() {
|
||||
await Config.set({
|
||||
cdn: { endpointClientKeepDefault: true, endpoint: `http://localhost:${port}` },
|
||||
gateway: { endpointClientKeepDefault: true, endpoint: `ws://localhost:${port}` },
|
||||
});
|
||||
|
||||
await api.start();
|
||||
await cdn.start();
|
||||
await gateway.start();
|
||||
|
||||
if (!Config.get().gateway.endpoint) await Config.set({ gateway: { endpoint: `ws://localhost:${port}` } });
|
||||
if (!Config.get().cdn.endpoint) await Config.set({ cdn: { endpoint: `http://localhost:${port}` } });
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
||||
|
||||
Reference in New Issue
Block a user