Server
Status
Disclaimer
This is an early alpha release, not meant for use in production! We're working to stabilise the 2.0 API, and until then there will be breaking changes. You have been warned!
Introduction
This is the Speckle Server 2.0. It consists of two distinct parts:
- The server application itself, which is a nodejs app,
- The frontend application, which is a static vuejs app.
For example usage, do check out the tests! We'll be also adding preliminary documentation on our forum.
Developing and Debugging
To get started, first clone this repo.
Setup
Server
To run the Server in debug mode:
- Duplicate and rename
.env-exampleto.env& fill it in! - Make sure a postgres instance is running locally, with two databases present, named
speckle2_devandspeckle2_test(or whatever needed to match your .envPOSTGRES_URLvariable). - Make sure a redis instance is running locally.
- Run
npm install - Run
npm run dev:server🚀
Frontend
To run the Frontend locally in debug mode:
- Switch your working directory to
/frontend - Run
npm install - Run
npm run dev:frontendfrom the Server root folder, ornpm run servefrom/frontend.
To build the frontend, simply run npm run build:frontend.
Frontend & Backend
To run both at the same time with one command only, simply run npm run dev:all. Take care: for this to work, you should install the frontend dependencies first.
Testing
The Server is quite thoroughly covered by tests. We'll aim to keep it that way. Once you have followed the setup steps above, you can run all the tests by hitting npm run test:server.
For testing specific functionality, use NODE_ENV=test mocha --grep ${scope} --watch. For example, if you want to test the commit services only, you can run mocha --grep @core-commits --watch
Contributing
Please make sure you read the contribution guidelines for an overview of the best practices we try to follow.
When pushing commits to this repo, please follow the following guidelines:
- Install commitizen globally (
npm i -g commitizen). - When ready to commit,
git cz& follow the prompts. - Please use either
serverorfrontendas the scope of your commit.
Community
The Speckle Community hangs out in two main places, usually:
Do join and introduce yourself!
License
Unless otherwise described, the code in this repository is licensed under the Apache-2.0 License. Please note that some modules, extensions or code herein might be otherwise licensed. This is indicated either in the root of the containing folder under a different license file, or in the respective file's header. If you have any questions, don't hesitate to get in touch with us via email.