Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lexoyo committed Nov 3, 2023
1 parent fe818a6 commit a4b4c5b
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,23 @@ There is a desktop application that you can install on your computer which may b

You can also run Silex locally or on your server using `npx`, `npm`, or `Docker`.

Check the [developer docs](https://docs.silex.me/en/dev) for configuration options and integration with your js projects.

#### Using npx

```bash
npx @silexlabs/silex
```

This command will run Silex with the entry point being `src/ts/server/cli.ts`.
This command will run Silex with default config.

#### Using Docker

```bash
docker run -p 6805:6805 silexlabs/silex
```

This command will run Silex in a Docker container with the entry point being `src/ts/server/index.ts`.
This command will run Silex in a Docker container.

#### Using npm

Expand All @@ -72,13 +74,27 @@ First, install Silex as a dev dependency in your project:
npm install --save-dev @silexlabs/silex
```

Then, you can run Silex with the `silex` command. The entry point is `src/ts/server/cli.ts`.
Then, you can run Silex with the `silex` command in your `package.json` scripts:

```json
{
"scripts": {
"start": "silex"
}
}
```

## Configuration

You can configure Silex using environment variables and command-line options. All available options can be found in `src/ts/server/cli.ts`.
You can configure Silex using environment variables and command-line options. All available options can be found in the [developer docs](https://docs.silex.me/en/dev) as well as in the code: [`src/ts/server/cli.ts`](./src/ts/server/cli.ts).

Check the example config files - which are the same as plugins in Silex, in the [`examples/`](./examples/) folder. To test these configs, start Silex locally like this:

```sh
$ npx silex --client-config=./examples/client-config-transformers.js --server-config=`pwd`/examples/server-config-plugins.js
```

There are config files (same as plugins) in the `examples/` folder. To start Silex locally with these config:
Or like this:

```sh
$ SILEX_CLIENT_CONFIG=./examples/client-config-transformers.js SILEX_SERVER_CONFIG=`pwd`/examples/server-config-plugins.js npm run start:debug
Expand Down

0 comments on commit a4b4c5b

Please sign in to comment.