open-index/open-npm huggingface dataset:
npm package: @octree/strapi-template
Description: ```bash yarn create strapi-app my-project --template @octree/strapi-template cd my-project cat .env.example >> .env nano .env ```
Author: Tim Izzo
Latest version: 0.3.0

# Use

```bash
yarn create strapi-app my-project --template @octree/strapi-template
cd my-project
cat .env.example >> .env
nano .env
```
npm package: @octree/strapi-timescale-logger
Description: Send Strapi logs to TimeScaleDB
Author: Tim Izzo
Latest version: 0.2.0

# @octree/strapi-timescale-logger

Send Strapi's logs to TimescaleDB.

## Setup

1. Create an hypertable in a database:
   ```sql
   CREATE TABLE logs (
        timestamp timestamp without time zone DEFAULT now(),
        level character varying,
        message character varying,
        meta json
   );
   SELECT create_hypertable('logs','timestamp');
   SELECT add_retention_policy('logs', INTERVAL '3 months'); -- Optional
   ```
2. Set environment variables (`.env` file can be used):
   ```
   LOG_DATABASE_URL=psql://postgres:password@127.0.0.1:5432/logs
   LOG_DATABASE_TABLE=log_client
   ```

3. Configure Strapi to use the logger by editing `config/logger.js`

   ```js
    const TimescaleLogger = require("@octree/strapi-timescale-logger");

    module.exports = ({ env }) => {
      const transports = [
        new winston.transports.Console({
          level: "http",
          format: winston.format.combine(
            prettyPrint({ timestamps: "YYYY-MM-DD hh:mm:ss.SSS" })
          ),
        }),
      ];

      if (env("LOG_DATABASE_URL")) {
        transports.push(
          new TimescaleLogger({
            level: "http",
            tableName: env("LOG_DATABASE_TABLE"),
            knexConfig: {
              client: "pg",
              connection: env("LOG_DATABASE_URL"),
            },
          })
        );
      }

      return {
        transports,
      };
    };
   ```