# Setup

## Setting up mockit

Running `mockit` is a fairly straight forward process:

#### Create fixtures

By default, `mockit` will scan files ending in `.fixture.js` under`<rootDir>/mockit`for fixtures.  You can configure this in `mockit.json` (See [Advance](advance) for more details).

```
project
└───mockit
    └───fixtures
        │   fixture.js
```

{% code title="fixture.js" %}
```javascript
module.exports = {
    url: '/api/sensu',
    data: [
        {
            type: 'Raw',
            power: 2000
        },
        {
            type: 'Stale',
            power: 1
        }
    ]
};
```
{% endcode %}

By default, `mockit` will assume this is a `GET` request with status of `200` and content-type of `application/json`. Of course, you can configure this (see [Fixture](fixture) for more details).

#### Done!

Now, all you need to do is start the server. On your terminal, run `npx mockit start`. Your mock server will be hosted on `http://localhost:3000` while the client will be served on `http://localhost:3000/mockit`.

{% hint style="info" %}
&#x20;Found an issue? Please let us know!.
{% endhint %}

