open-index/open-npm huggingface dataset:
npm package: @lingxi.li/prism-cli
Description: You can install the command line CLI using `npm i -g @lingxi.li/prism-cli`
Author: Stoplight
Latest version: 5.12.4

# prism-cli

You can install the command line CLI using `npm i -g @lingxi.li/prism-cli`

To get an overview of all the commands, just do `prism help`

## Documentation

Read me about the [Prism CLI](../../docs/getting-started/03-cli.md).

## Development

### Debugging

1. `yarn cli:debug mock file.oas.yml`
2. Run your preferred debugger on the newly created process. If you're into VS Code, you can create `.vscode/launch.json` and put this content inside:

```json
{
  "type": "node",
  "request": "attach",
  "name": "Attach",
  "port": 9229
},
```

4. Enjoy the breakpoints :)
npm package: @lingxi.li/prism-http-server
Description: **NOTE:** The current API is still experimental and could change with no notice. Use at your own risk.
Author: Stoplight
Latest version: 5.12.0

# Prism Server

**NOTE:** The current API is still experimental and could change with no notice. Use at your own risk.

Usage:

```javascript
const { createServer } = require('@lingxi.li/prism-http-server');
const { getHttpOperationsFromSpec } = require('@lingxi.li/prism-cli/dist/operations');
const { createLogger } = require('@stoplight/prism-core');

async function createPrismServer() {
  const operations = await getHttpOperationsFromSpec('YOUR-URL');

  const server = createServer(operations, {
    components: {
      logger: createLogger('TestLogger'),
    },
    cors: true,
    config: {
      checkSecurity: true,
      validateRequest: true,
      validateResponse: true,
      mock: { dynamic: false },
      isProxy: false,
      errors: false,
    },
  });
  await server.listen(4010);

  return {
    close: server.close.bind(server),
  };
}

const server = await createPrismServer();

server.close();
```