mirror of
https://github.com/lowdefy/lowdefy.git
synced 2025-02-23 14:39:32 +08:00
Merge pull request #805 from lowdefy/node-server-docs
fix(docs): Update node server docs.
This commit is contained in:
commit
fc3e795e5c
@ -41,30 +41,56 @@ _ref:
|
||||
To add the server as a dependency, run
|
||||
|
||||
```
|
||||
npm install @lowdefy/server-node --save
|
||||
npm install @lowdefy/server-node --save --save-exact
|
||||
```
|
||||
|
||||
### Step 3 - Build the Lowdefy project
|
||||
### Step 3 - Add the Lowdefy CLI to you project as a dev dependency.
|
||||
|
||||
To add the server as a dependency, run:
|
||||
|
||||
```
|
||||
npm install lowdefy --save-dev --save-exact
|
||||
```
|
||||
|
||||
### Step 4 - Add the `build` and `start` scripts.
|
||||
|
||||
Add the following to the `scripts` section in your `package.json` file:
|
||||
|
||||
```json
|
||||
"scripts": {
|
||||
"init": "lowdefy init",
|
||||
"build": "lowdefy build",
|
||||
"start": "lowdefy-server"
|
||||
},
|
||||
```
|
||||
|
||||
### Step 5 - Init a Lowdefy project
|
||||
|
||||
Run:
|
||||
|
||||
```
|
||||
npm run init
|
||||
```
|
||||
|
||||
### Step 6 - Add the public files:
|
||||
|
||||
Create a folder called `public` in your project directory and add the Lowdefy public files found [here](https://github.com/lowdefy/lowdefy/tree/main/packages/shell/src/public) (or add your own logos and files).
|
||||
|
||||
### Step 7 - Build the Lowdefy project
|
||||
|
||||
Build the Lowdefy configuration files in the project by running:
|
||||
|
||||
```
|
||||
npx lowdefy build
|
||||
npm run build
|
||||
```
|
||||
|
||||
> You can also install the Lowdefy CLI as a dev dependency using `npm install lowdefy --save-dev` and run the build command using `lowdefy build`.
|
||||
|
||||
### Step 4 - Start the server
|
||||
### Step 8 - Start the server
|
||||
|
||||
To start the server, run:
|
||||
|
||||
```
|
||||
npm run start
|
||||
```
|
||||
or
|
||||
```
|
||||
node dist/server.js
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user