NECos is a Discord bot & REST API developed for the Nuclear Engineering Co. (See links below).
NECos Releases
Nuclear Engineering Co.
NECo Discord
NECos has a built-in CLI utility, via the necos
script in the root project directory. Run ./necos usage
to get a list of commands.
You can also run the application manually by requiring the src/necos.ts
file.
NECos is written in TypeScript, but it also ships with ts-node as a dependency so you're good there.
However, NECos requires npx, if starting the bot via CLI.
-
Clone the NECos repository to whatever directory you'd like.
git clone https://github.com/Nuclear-Engineering-Co/NECos
-
Run
npm install
, oryarn install
. PNPM has NOT been tested. -
Copy the
.env.example
file to.env
. The application will NOT start without valid configuration. Seeconfiguration
below.
NECos requires a working database backend. The application uses Knex as a database backend.
TODO finish configuration documentation
To run NECos, it's as simple as running ./necos start
, and optionally adding the --debug
flag for extra output messages. (For all flags, see ./necos usage')
Database migration takes place automatically when running the application for the first time.
Deploying the NECos application is a straightforward process:-
Run
./necos build
to transpile the TypeScript code in to normal JavaScript. This will output the transpiled code to thebuild
directory. -
It is best to ensure the transpiled version of NECos runs properly before attempting to daemonize or automate. To do so, run
./necos start
. This will start the production version of the application. -
Daemonize the application however you'd like, either via systemd or your preferred solution. Ensure the "working directory" of the application is wherever you have the application's root folder stored. (The folder containing this README.)