https://github.com/cinderblock/pwm-controller
An interface for managing sysfs pwm channels
https://github.com/cinderblock/pwm-controller
Last synced: 2 months ago
JSON representation
An interface for managing sysfs pwm channels
- Host: GitHub
- URL: https://github.com/cinderblock/pwm-controller
- Owner: cinderblock
- License: gpl-3.0
- Created: 2016-10-05T07:47:25.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-11-02T05:29:00.000Z (over 6 years ago)
- Last Synced: 2025-01-28T02:16:05.717Z (over 1 year ago)
- Language: JavaScript
- Size: 23.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pwm-controller
An interface for managing sysfs pwm channels
## Installation
Clone git repo and run `npm install`:
```
git clone https://github.com/cinderblock/pwm-controller.git
cd pwm-controller
npm install
```
`npm install` will also run webpack and generate a folder `webpack` to serve static files from.
## Run Server
Using npm to start the server ensures that configuration options are loaded.
```
npm run server
```
## Development
Server with nodemon:
```
npm run server-dev
```
Client webpack watch server:
```
npm run client-dev -- --open # --open to automatically open browser
```
## Configuration
Can be configured to run on ports other than 9000 with `npm config set ...`
```
# Change default port
npm config set pwm-controller:port 9001
# Set address to bind to
npm config set pwm-controller:hostname 127.0.0.1
```
It is also possible to use a unix socket instead:
```
npm config set pwm-controller:socket /path/to/file.sock
```
If using a unix socket, you can specify a mode sting to pass to chmod to set correct file permissions on the created socket.
```
npm config set pwm-controller:socketmode 666
```