Using `docker` is the simplest way to build, start, and host this piece of software:
```bash
# Build the image
docker build -t openscad-remote:latest .
# Start the container
docker run --rm -it -p 5000:5000 openscad-remote:latest
```
Alternatively, you can use `docker-compose` which should simplify the above commands:
```bash
# Build the image
docker-compose build
# Start the container
docker-compose up
```
### :snake: Python + uWSGI
Running this with pure Python and uWSGI has a few requirements:
* Flask
* Flask-Cors
* OpenSCAD
* uWSGI
OpenSCAD and uWSGI should be installed with your Linux distribution's package manager. Flask and Flask-Cors can be installed with `pip`, just use the `requirements.txt` file for maximum lazyness.
Once everything is installed, start the server with the following command:
**The below tool can be currently found online at the following URL : https://cad.interstellai.re/multi-uploader.html. However, it is not guarantee to be always up. Look at the badge above to check the status, refresh the page to refresh the status.**
The service is exposed on port 5000. You can send the files through a `POST` request and the server will answer with an STL file (given that it worked).
**Documentation of the payload and entrypoint is coming soon...**
Alternatively, you can serve the `multi-uploader.html` with Python and access it from a browser:
```bash
# Go into the tools folder if not already done
cd tools
python -m http.server 8000
```
You can then access a neat little interface (_work in progress_) from your browser at http://localhost:8000/multi-uploader.html
**More is coming: a better server for the UI, maybe integrate this project into a bigger one, more documentation, Matrix bot ?...**