🐛 fix CDN
This commit is contained in:
parent
dd87cf1dba
commit
fdaa277935
1221
package-lock.json
generated
1221
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
15
package.json
15
package.json
@ -1,10 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "discord-cdn",
|
"name": "@fosscord/cdn",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "cdn for discord clone",
|
"description": "cdn for discord clone",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
|
"build": "tsc -b .",
|
||||||
|
"start": "npm run build && node dist/"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@ -23,18 +25,19 @@
|
|||||||
"cheerio": "^1.0.0-rc.5",
|
"cheerio": "^1.0.0-rc.5",
|
||||||
"express": "^4.17.1",
|
"express": "^4.17.1",
|
||||||
"express-async-errors": "^3.1.1",
|
"express-async-errors": "^3.1.1",
|
||||||
"lambert-db": "^1.0.5",
|
"lambert-db": "^1.2.3",
|
||||||
"lambert-server": "^1.0.3",
|
"lambert-server": "^1.2.1",
|
||||||
"missing-native-js-functions": "^1.0.8",
|
"missing-native-js-functions": "^1.0.8",
|
||||||
"multer": "^1.4.2",
|
"multer": "^1.4.2",
|
||||||
"node-fetch": "^2.6.1",
|
"node-fetch": "^2.6.1",
|
||||||
"uuid": "^8.3.2"
|
"uuid": "^8.3.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@types/body-parser": "^1.19.0",
|
||||||
"@types/btoa": "^1.2.3",
|
"@types/btoa": "^1.2.3",
|
||||||
"@types/express": "^4.17.9",
|
"@types/express": "^4.17.11",
|
||||||
"@types/multer": "^1.4.5",
|
"@types/multer": "^1.4.5",
|
||||||
"@types/node": "^14.14.16",
|
"@types/node": "^14.14.43",
|
||||||
"@types/node-fetch": "^2.5.7",
|
"@types/node-fetch": "^2.5.7",
|
||||||
"@types/uuid": "^8.3.0"
|
"@types/uuid": "^8.3.0"
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ export class CDNServer extends Server {
|
|||||||
db: Database;
|
db: Database;
|
||||||
public options: CDNServerOptions;
|
public options: CDNServerOptions;
|
||||||
|
|
||||||
constructor(options: CDNServerOptions) {
|
constructor(options: Partial<CDNServerOptions>) {
|
||||||
super(options);
|
super(options);
|
||||||
|
|
||||||
this.db = new MongoDatabase(options?.db);
|
this.db = new MongoDatabase(options?.db);
|
||||||
|
11
src/index.ts
11
src/index.ts
@ -1,14 +1,9 @@
|
|||||||
import { Server } from "./Server";
|
import { CDNServer } from "./Server";
|
||||||
|
|
||||||
const server = new Server();
|
const server = new CDNServer({ db: "" });
|
||||||
server
|
server
|
||||||
.init()
|
.start()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
console.log("[Server] started on :" + server.options.port);
|
console.log("[Server] started on :" + server.options.port);
|
||||||
})
|
})
|
||||||
.catch((e) => console.error("[Server] Error starting: ", e));
|
.catch((e) => console.error("[Server] Error starting: ", e));
|
||||||
|
|
||||||
//// server
|
|
||||||
//// .destroy()
|
|
||||||
//// .then(() => console.log("[Server] closed."))
|
|
||||||
//// .catch((e) => console.log("[Server] Error closing: ", e));
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user