Signal K server is an Open Source project and contributions are welcome.
Contributions are made by creating Pull Requests in the GitHub repository.
Working on your first Pull Request?
You can learn how from this free series How to Contribute to an Open Source Project on GitHub
Clone the repository:
git clone https://github.com/SignalK/signalk-server
cd signalk-server
Install dependencies:
npm install
Build the server and related packages:
npm run build:all
Start the server:
npm start
The server should now be available at http://localhost:3000.
As you work on your changes, you may need to re-build changes. To continuously watch for changes, open a new terminal and run npm run watch in either the project root, or from the relevant directory in packages/*.
You may also need to restart the server to see some changes reflected.
Start the server with sample data by running:
bin/nmea-from-filebin/n2k-from-fileThis will start the server with a sample configuration file and the server will start playing back data from a sample file under samples/. The data is available immediately via the REST interface at https://localhost:3000/signalk/v1/api/.
This small demo shows how to connect the Signal K Server WebSocket interface from the command line:
npm install -g wscat2
wscat 'ws://localhost:3000/signalk/v1/stream?subscribe=all'
Before you submit your Pull Request (PR) consider the following guidelines:
Fork the repository.
Make your changes in a new git branch:
git checkout -b my-fix-branch master
Create your patch.
Commit your changes using a descriptive commit message that follows the conventions outlined here. Whilst we are not 100% strict about this, it really helps when reviewing the PR and in making the commit history readable. The TL;DR of it is below.
<type>: <subject>, where <type> should be one of:
<subject> should use imperative, present tense: "change" not "changed" or "changes"doc: clarify meta.units behaviourchore: update keyswithmetadat.jsonstyle: whitespacefix: allow nextPoint to be an intermediate leaffeature: push design object fields under value/valuesPush your branch to GitHub:
git push origin my-fix-branch
In GitHub, create a pull request.
Implement the agreed changes.
Rebase your branch and force push to your GitHub repository (this will update your Pull Request):
git rebase master -i
git push -f
After your pull request is merged, you can safely delete your branch and pull the changes from the main (upstream) repository:
Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
git push origin --delete my-fix-branch
Check out the master branch:
git checkout master -f
Delete the local branch:
git branch -D my-fix-branch
Update your master with the latest upstream version:
git pull --ff upstream master