# fxos-start

> Start a Firefox OS simulator

Latest version **0.3.0** (published 2014-09-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install fxos-start
pnpm add fxos-start
yarn add fxos-start
bun add fxos-start
```

Provides the command `fxos-start`.

## 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.3.0 |
| Published | 2014-09-18 |
| First published | 2014-08-26 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Nicola Greco |
| Maintainers | nicola |
| Keywords | simulator, developer tools, b2g, firefoxos, fxos, webapps |

## Links

- npm: https://www.npmjs.com/package/fxos-start
- Repository: https://github.com/nicola/fxos-start
- Issues: https://github.com/nicola/fxos-start/issues
- npm.io page: https://npm.io/package/fxos-start

## Dependencies (8)

- [q](https://npm.io/package/q.md) ^1.0.1
- [async](https://npm.io/package/async.md) ^0.9.0
- [nomnom](https://npm.io/package/nomnom.md) ^1.8.0
- [fx-ports](https://npm.io/package/fx-ports.md) ^0.3.0
- [portfinder](https://npm.io/package/portfinder.md) ^0.2.1
- [underscore](https://npm.io/package/underscore.md) ^1.7.0
- [firefox-client](https://npm.io/package/firefox-client.md) ^0.3.0
- [fxos-simulators](https://npm.io/package/fxos-simulators.md) ^0.3.0

## Recent versions

- 0.3.0 (latest) — 2014-09-18
- 0.2.0 — 2014-09-15
- 0.1.1 — 2014-08-27
- 0.1.0 — 2014-08-26

## README

# fxos-start

Start a FirefoxOS simulator if no simulator is running.

## Install

```sh
# Library
$ npm install fxos-start

# Command line
$ npm install -g fxos-start
```

## Usage

```sh
Usage: fxos-start [options]

Options:
   -p, --port                   Port of FirefoxOS
   -f, --force                  Kill other simulators on this port
   --verbose                    Set the output level to verbose
   --bin                        Set external B2G bin
   --profile                    Set external B2G profile
   --release <release>          Release of FirefoxOS to filter
   --exit                       Exit after startup
   --stdin <stdin filepath>     The path where stdin of the simulator will be redirected to
   --stdout <stdout filepath>   The path where stdout of the simulator will be redirected to
   --stderr <stderr filepath>   The path where stderr of the simulator will be redirected to
   --timeout                    The timeout time to wait for a response from the Simulator.
   --version                    Print version and exit
```

### Start a simulator on known port, connect and return client

Start a FirefoxOS simulator and connect to it through [firefox-client](https://github.com/harthur/firefox-client) by returning `client`.
```javascript
var start = require('fxos-start');
start({port:1234}, function(err, client) {
  // Let's show for example all the running apps
  client.getWebapps(function(err, webapps) {
    webapps.listRunningApps(function(err, apps) {
      console.log("Running apps:", apps);
    });
  });
})
```

### Start a simulator on known port without connecting
Just start a FirefoxOS simulator without opening a connection:

```javascript
var start = require('fxos-start');
start({port:1234, connect:false}, function(err) {
  // Let's show for example all the running apps
  client.connect(1234, function() {
    client.getWebapps(function(err, webapps) {
      webapps.listRunningApps(function(err, apps) {
        console.log("Running apps:", apps);
      });
    });
  });
})
```

### Start a simulator on any port
Just start a  without opening a connection:

```javascript
var start = require('fxos-start');
start(function(err, client) {
  // Let's show for example all the running apps

  client.getWebapps(function(err, webapps) {
    webapps.listRunningApps(function(err, apps) {
      console.log("Running apps:", apps);
    });
  });
})
```

## Usage with command line

```sh
$ fxos-start
Firefox Simulator started on port 8901

$ fxos-start -p 8001
Firefox Simulator started on port 8001
```

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