# figc

> Merge config files with command-line arguments

Latest version **0.0.3** (published 2012-09-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install figc
pnpm add figc
yarn add figc
bun add figc
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2012-09-07 |
| First published | 2011-12-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.4.0 |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | James Halliday |
| Maintainers | substack |
| Keywords | config, json, argv, options, arguments |

## Links

- npm: https://www.npmjs.com/package/figc
- Repository: https://github.com/substack/node-figc
- npm.io page: https://npm.io/package/figc

## Dependencies (2)

- [optimist](https://npm.io/package/optimist.md) ~0.3.1
- [deepmerge](https://npm.io/package/deepmerge.md) ~0.2.1

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 0.0.3 (latest) — 2012-09-07
- 0.0.2 — 2012-03-29
- 0.0.0 — 2011-12-09

## README

figc
====

Merge config files with command-line arguments.

[![build status](https://secure.travis-ci.org/substack/node-figc.png)](http://travis-ci.org/substack/node-figc)

examples
========

server
------

server.js:

``` js
var figc = require('figc');
var config = figc(__dirname + '/config.json');

var http = require('http');

var server = http.createServer(function (req, res) {
    res.end(config.msg + '\n');
});
server.listen(config.port);
```

config.json:

``` js
{
    "port" : 8085,
    "msg" : "..."
}
```

default output:

```
$ node server.js &
[1] 19109
$ curl -sN http://localhost:8085
...
```

custom port and message:

```
$ node server.js --msg='beep boop' --port=8086 &
[1] 19114
$ curl -sN http://localhost:8086
beep boop
```

methods
=======

``` js
var figc = require('figc');
```

var config = figc(configFile, argv=process.argv)
------------------------------------------------

Load a json configuration from `configFile` and merge its contents with `argv`
which will be parsed by
[optimist](http://github.com/substack/node-optimist).

install
=======

With [npm](http://npmjs.org) do:

    npm install figc

license
=======

MIT/X11

---
_Source: https://npm.io/package/figc · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
