Skip to content

kennarddh/celosiajs-boilerplate

Repository files navigation

CelosiaJS Boilerplate

Uses CelosiaJS framework.

Previously express-boilerplate.

Guide

Install Dependencies

npm install

Environment Variables

The environment variables can be found and modified in the .env file. See .env.example for default values.

Project Structure

src/
 |--Versions/             # Versions list
 |  |--V{/\d+/}/          # Version (Example: V1, V2, V3)
 |  |  |--Controllers/    # Controllers
 |  |  |--Routes/         # Routes
 |--Controllers/          # Controllers
 |--Routes/               # Main routes
 |--Database/             # Database configuration
 |--Middlewares/          # Middlewares
 |--Utils/                # Utility classes and functions
 |--Types/                # Typescript types definition
 |--App.ts                # CelosiaJS instance
 |--index.ts              # Entry

Available Scripts

In the project directory, you can run:

Start Development Server

npm start

Build Production

Build the project for production

npm run build

Start Production

Start the built project

npm run prod

Clean

Run all clean script.

npm run clean

Clean Build

Removes all the files generated by the build process.

npm run clean:build

Clean Logs

Removes all logs.

npm run clean:logs

Lint Build

Transpile eslint.config.ts into eslint.config.js because eslint cannot read Typecript config.

npm run lint:build

Lint Check

Finds linting errors.

npm run lint:check

Lint Fix

Fix linting errors.

npm run lint:fix

Prettier check

Check the code formatting.

npm run prettier:check

Prettier fix

Fix the code formatting.

npm run prettier:fix

Types Check

Check Typescript types.

npm run types:check

Check

Check linting, code formatting, Typescript types.

npm run check

Fix

Fix linting, code formatting, and check Typescript types.

npm run fix