Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/emmanuelbeziat/emmanuelbeziat-state

πŸ”” Get some build logs out without needing to connect to my server.
https://github.com/emmanuelbeziat/emmanuelbeziat-state

fastify logs nodejs nunjucks

Last synced: 3 months ago
JSON representation

πŸ”” Get some build logs out without needing to connect to my server.

Awesome Lists containing this project

README

        

# ![Emmanuel BΓ©ziat Logo](public/favicons/favicon-32x32.png) emmanuelbeziat-state :: Emmanuel BΓ©ziat

πŸ”” Get some build logs out without needing to connect to my server.

![Built with](https://img.shields.io/badge/built_with-fastify-blue.svg?style=flat) ![Built With](https://img.shields.io/badge/built_with-nunjucks-green.svg?style=flat
)

## What?

- Fetch build logs
- Environment configuration using dotenv

## Installation

```bash
# Get the repo
git clone git+ssh://[email protected]/EmmanuelBeziat/emmanuelbeziat-state.git

# Navigate into project folder
cd emmanuelbeziat-state

# Intall dependencies
npm i
```

**.env file example:**

```env
PORT=3000
HOST="127.0.0.1"
LOGS_PATH="/var/logs/mywebsite"
FILE_LOG="mywebsite.log"
FILE_STATUS="status.log"
SERVICES_LIST=[{ "name": "", "url": ""}]
WEBSOCKET_PORT=
AUTH_USERNAME=
AUTH_PASSWORD=
```

## Usage

- **Start the application in development mode:**
```bash
npm run dev
```
Launches the application with hot-reloading for development, with changes in real-time with node watch.

- **Start the application in production mode:**
```bash
npm run prod
```
Runs the application in a production environment, optimized for performance and stability, with nodemon.

- **Deploy the application:**
```bash
npm run deploy
```
Deploys the application for production using PM2.

- **Run tests:**
```bash
npm run test
```
Run all tests

- **Run route tests:**
```bash
npm run test:routes
```
Specifically tests the application's routes to verify that they respond correctly.

- **Run environment tests:**
```bash
npm run test:env
```
Checks the environment configurations to ensure all necessary variables are set correctly.

- **Run class tests:**
```bash
npm run test:class:home
```
Runs tests for the Home class.

```bash
npm run test:class:log
```
Runs tests for the Log class.

- **Run filter tests:**
```bash
npm run test:filters
```
Runs tests for filters.

- **Run template tests:**
```bash
npm run test:templates
```
Runs tests for templates.

## License

This project is licensed under the GPL-3.0-or-later License.