open-index/open-npm huggingface dataset:
npm package: 3nit-utils
Description: NodeJS & React utils for 3nit projects
Author: Jonas Windey
Latest version: 1.0.2

# 3nit-utils

Utils for setting up a Next.js project

Minimal `server.js` setup:

```js
require('babel-polyfill')
require('babel-register')({presets: ['es2015', 'stage-0']})
require('dotenv').config()

const utils = require('3nit-utils')

const {db, server} = utils
const dev = process.env.NODE_ENV !== 'production'

const models = require('../config/models')

require('debug').enable('dev')

db.init(require('mongoose'), 'mongodb://localhost/*****', models).then(() => {
  server.init({
    port: dev ? 4000 : 8049,
    app: require('next')({ dev, dir: '.' }),
    routes: require('./api').routes})
})
```
npm package: 3nv
Description: .env toolbox
Author: Filipp Vasilev
Latest version: 2.0.7

# 3nv

tool for managing .env file

```bash
yarn add 3nv
```

## Usage

Get config from `.env` file without modifying process.env
```ts
import { init } from './lib/index.js';

const config = init();
```

Init parameters:

Name             | Default value | Possible values | Description
-----------------|---------------|-----------------|-------------
path             | '.env'        | string          | Path to .env file
modifyProcessEnv | false         | boolean         | Add env vars to process.env object
verbose          | false         | boolean         | Extended logging 
copyFromExample  | true          | boolean         | Copy .env.example content to .env file if it doesn't exists

## CLI 
The package provides command for copying your `.env` template to `.env.example` file:

```json
# package.json
{
  "scripts": {
    "dump": "3nv dump"
  }
}
```
```bash
yarn dump
```