mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
feat: allow css configuration from package.json or config file
This commit is contained in:
committed by
Joachim Van Herwegen
parent
bf0e35be37
commit
d61bf9bf19
@@ -34,6 +34,7 @@ the [changelog](https://github.com/CommunitySolidServer/CommunitySolidServer/blo
|
||||
* [How to use the Identity Provider](usage/identity-provider.md)
|
||||
* [How to automate authentication](usage/client-credentials.md)
|
||||
* [How to automatically seed pods on startup](usage/seeding-pods.md)
|
||||
* [Using the CSS as a development server in another project](usage/dev-configuration.md)
|
||||
|
||||
## What the internals look like
|
||||
|
||||
|
||||
49
documentation/markdown/usage/dev-configuration.md
Normal file
49
documentation/markdown/usage/dev-configuration.md
Normal file
@@ -0,0 +1,49 @@
|
||||
# Configuring the CSS as a development server in another project
|
||||
|
||||
It can be useful to use the CSS as local server to develop Solid applications against.
|
||||
As an alternative to using CLI arguments, or environment variables, the CSS can be configured in the `package.json` as follows:
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "test",
|
||||
"version": "0.0.0",
|
||||
"private": "true",
|
||||
"config": {
|
||||
"community-solid-server": {
|
||||
"port": 3001,
|
||||
"loggingLevel": "error"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"dev:pod": "community-solid-server"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@solid/community-server": "^6.0.0"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
These parameters will then be used when the `community-solid-server`
|
||||
command is executed as an npm script (as shown in the example above).
|
||||
Or whenever the `community-solid-server` command is executed in the same
|
||||
folder as the `package.json`.
|
||||
|
||||
Alternatively, the configuration parameters may be placed in a configuration file named
|
||||
`.community-solid-server.config.json` as follows:
|
||||
|
||||
```json
|
||||
{
|
||||
"port": 3001,
|
||||
"loggingLevel": "error"
|
||||
}
|
||||
```
|
||||
|
||||
The config may also be written in JavaScript with the config as the default export
|
||||
such as the following `.community-solid-server.config.js`:
|
||||
|
||||
```js
|
||||
module.exports = {
|
||||
port: 3001,
|
||||
loggingLevel: "error"
|
||||
};
|
||||
```
|
||||
Reference in New Issue
Block a user