Skip to content

Commit

Permalink
Replit config
Browse files Browse the repository at this point in the history
  • Loading branch information
RezkyRizaldi committed Nov 28, 2022
1 parent 462915d commit 3d14c1d
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 6 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,6 @@ package-lock.json
.pnp.*
.yarn/
yarn.lock
.vscode
.vscode

.config
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"anime-images-api": "^2.0.0",
"ascii-table": "^0.0.9",
"axios": "^1.1.3",
"canvas": "^2.10.2",
"change-case": "^4.1.2",
"color-convert": "^2.0.1",
"ctk-anime-scraper": "^3.5.0",
Expand All @@ -53,7 +54,9 @@
"discord.js": "^14.6.0",
"distube": "^4.0.4",
"dotenv": "^16.0.3",
"express": "^4.18.2",
"ffmpeg-static": "^5.1.0",
"file-type": "^18.0.0",
"holodex.js": "^2.0.5",
"libsodium-wrappers": "^0.7.10",
"math-expression-evaluator": "^1.4.0",
Expand Down Expand Up @@ -83,4 +86,4 @@
"*.ts": "eslint --cache --fix",
"*.{ts,css,md}": "prettier --write"
}
}
}
14 changes: 10 additions & 4 deletions replit.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
{ pkgs }: {
deps = [
pkgs.nodejs-16_x
pkgs.nodePackages.typescript-language-server
pkgs.yarn
pkgs.replitPackages.jest
pkgs.python39Packages.pip
pkgs.nodejs-16_x
pkgs.nodePackages.typescript-language-server
pkgs.yarn
pkgs.replitPackages.jest
pkgs.python39Full
pkgs.libuuid
];
env = {
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [pkgs.libuuid];
};
}
4 changes: 4 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ require('dotenv').config();
const fs = require('fs');
const path = require('path');

const keepAlive = require('./server');

const {
GuildBans,
GuildInvites,
Expand Down Expand Up @@ -83,3 +85,5 @@ for (const folder of funcFolders) {
await client.handleCommands();
await client.login(process.env.TOKEN).catch(console.error);
})();

keepAlive();
12 changes: 12 additions & 0 deletions src/server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const express = require('express');
const server = express();

server.all('/', (req, res) => {
res.send('Result: OK!');
});

function keepAlive() {
server.listen(3000, () => console.log(`Server is now ready: | ${Date.now()}`));
}

module.exports = keepAlive;

0 comments on commit 3d14c1d

Please sign in to comment.