Skip to content

Latest commit

 

History

History
62 lines (44 loc) · 3.23 KB

README.md

File metadata and controls

62 lines (44 loc) · 3.23 KB

NECos


NECos is a Discord bot & REST API developed for the Nuclear Engineering Co. (See links below).

Links

NECos Releases
Nuclear Engineering Co.
NECo Discord

Information

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.

Installation

  1. Clone the NECos repository to whatever directory you'd like.
    git clone https://github.com/Nuclear-Engineering-Co/NECos

  2. Run npm install, or yarn install. PNPM has NOT been tested.

  3. Copy the .env.example file to .env. The application will NOT start without valid configuration. See configuration below.

Configuration

NECos requires a working database backend. The application uses Knex as a database backend.

TODO finish configuration documentation

Running the application

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 NECos

Deploying the NECos application is a straightforward process:
  1. Run ./necos build to transpile the TypeScript code in to normal JavaScript. This will output the transpiled code to the build directory.

  2. 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.

  3. 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.)