{"id":23500432,"url":"https://github.com/techninja/cncserver","last_synced_at":"2025-04-06T21:16:48.390Z","repository":{"id":7445611,"uuid":"8787297","full_name":"techninja/cncserver","owner":"techninja","description":"A RESTful API server for driving serial based CNC devices","archived":false,"fork":false,"pushed_at":"2024-02-06T17:12:27.000Z","size":5748,"stargazers_count":132,"open_issues_count":47,"forks_count":41,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-03-30T08:08:46.966Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/techninja.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-03-14T23:01:07.000Z","updated_at":"2025-01-02T05:39:53.000Z","dependencies_parsed_at":"2024-06-21T14:27:41.355Z","dependency_job_id":"f19860f3-a004-492f-afea-22dba9e5ca97","html_url":"https://github.com/techninja/cncserver","commit_stats":{"total_commits":603,"total_committers":8,"mean_commits":75.375,"dds":0.06135986733001664,"last_synced_commit":"a5d070191479111a13c49b006266417f7e2770e1"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techninja%2Fcncserver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techninja%2Fcncserver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techninja%2Fcncserver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techninja%2Fcncserver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/techninja","download_url":"https://codeload.github.com/techninja/cncserver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247550693,"owners_count":20956987,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-25T06:44:16.245Z","updated_at":"2025-04-06T21:16:48.361Z","avatar_url":"https://github.com/techninja.png","language":"JavaScript","readme":"# CNC server\n\n\u003cimg src=\"https://github.com/techninja/cncserver/blob/v3/src/interface/icon.png?raw=true\" style=\"float: right\"\u003e\n\nA [Node.js](https://nodejs.org/) based RESTful API to serial interface control for plotters, originally\ncreated for the [WaterColorBot](http://watercolorbot.com), currently aimed at [EBB controller](https://shop.evilmadscientist.com/productsmenu/188) based plotters from [Evil Mad Scientist Laboratories](https://www.evilmadscientist.com/) like\n[Axidraw](https://axidraw.com/), [Eggbot](https://egg-bot.com/), and other DIY implementations.\n\nThe purpose of the project is to abstract the nitty-gritty details for controlling a drawing robot, and utilizing proven web technologies, to simplify the interface and make drawing bots easier and more useful, either at your desk with a GUI, or via your own script running remotely.\n\n## Features\n\nCNC Server is an application that sits on a computer connected to your serial\nbased CNC peripheral and provides a [simple RESTful API](API.md) to access\ncommon CNC/plotter functions. These controls manifest as an abstracted method of\ncontrolling the bot to do what you ask while sanity checking and keeping crashes\ndown to a minimum.\n\n- Fast HTTP server via [Express](http://expressjs.com)\n- Runs great on even modest hardware. Raspberry Pi verified!\n- Self manages absolute pen position for relative motion plotter controllers.\n- Multiple API endpoints allow full control, motor overrides and \"tool\" changes.\n  Read [the documentation](API.md) and implement _your own_ client!\n- An even simpler [API](SCRATCH.API.md) allows for Scratch programming support, with [examples](https://github.com/evil-mad/watercolorblocks).\n- Accepts direct X/Y absolute pen positions as percentage of total width/height.\n- Client agnostic! We don't care what controls the bot, as long as it follows\n  the rules. See it in use by [US President Barack Obama on an iPad](https://youtu.be/2HfgGDOZPCQ?t=1928)!\n- Configuration file and argument driven (see\n  [example here](machine_types/watercolorbot.ini)), allows for server\n  customization to fit _almost_ any style of bot using a supported controller.\n\n## Installation\n\n### Install Node.js\n\nUnless you already have it installed, either download [the installer for your operating system](http://www.nodejs.com/download), or use [node version manager](https://github.com/nvm-sh/nvm). We recommend using at least version 18+, although lower versions may work.\n\n### CNC server files\n\n- **For easy updating from master:** Use the handy GUI! Click the\n  \"Clone in Mac/Windows\" button at the top of the\n  [GitHub repo homepage](https://github.com/techninja/cncserver). When new code\n  updates come along, just click the refresh/sync button and you'll be up to date!\n- **For quick use:** Download the files\n  [here](https://github.com/techninja/cncserver/archive/master.zip), unzip them to\n  a handy folder, and you're ready to run!\n- **For developers looking to improve it:** Fork the repo, make your changes in\n  a branch, and submit a pull request! We're always looking for contributions that\n  make things better for everyone, fix issues, or add features!\n\n### Installing NPM Dependencies\n\nWith your system setup and everything else installed, open a terminal and make your\nway to the `cncserver` folder, and enter `npm install` (you may need to preface\nthat with a sudo command on Mac/Linux). For Mac, building `node-serialport`\nrequires `make`, which comes with Xcode, a free download.\n\n## Running\n\nCNC Server _currently_ only supports the late model\n[EBB](http://www.schmalzhaus.com/EBB/) and its command set. Of the devices that\nuse it, the WaterColorBot, the EggBot, and AxiDraw have reliable support. More\ndevices to come soon!\n\nPlug in your device, and from the terminal in the `cncserver` repository root\nfolder, start the server with the command `npm start`, and you've got it!\n\nOnce the server is up and running, the API should now be available at\n`http://localhost:4242`. The `4242` is the port on the local computer, which you\ncan easily change in the configuration shown below.\n\n### Configuration\n\nBy default, CNC Server hosts the API on the localhost port `4242`\nand attempts to autodetect the correct serial port to connect to for the given\nbot configuration. If you want to tweak these settings or any other global\nconfiguration permanently, just edit the `config.ini` file that is generated on\nfirst run and stored in the same folder as `cncserver.js`. If you want to make\ntemporary config adjustments, just pass the same config names and values when\nexecuting. Common examples might include:\n\n```\n# Change the hosting port to HTTP default, and force the serial port (no equals)\nnode cncserver --httpPort 80 --serialPath /dev/ttyUSB1243\n\n# Change bot type to EggBot, and invert the X motor axis (with equals)\nnode cncserver --botType=eggbot --invertAxis:x=true\n```\n\n## Problems?\n\n**_Stuck on something?_** Submit an issue! Click the\n[issues tab](https://github.com/techninja/cncserver/issues) and see if someone\nis covering your question or problem, if not, ask away! Someone will be around\nto help soon.\n\n**_Know how to fix a problem? Or want to add a new feature??_** Submit a pull\nrequest! Just fork the repo using the button on the\n[cncserver github homepage](https://github.com/techninja/cncserver), and this\nwill give you your own version of cncserver. Make your change in a few commits\nto your branch, then click the pull request button at the top! Talk about what\nchanges you made and submit. A maintainer of the project will check your work,\npossibly ask you to fix a few more things, and then if all is well, your work\nwill be merged into the project!\n\n## ETC.\n\nAll code MIT licensed. Created by TechNinja, with support and collaboration from\n[Evil Mad Scientist](http://evilmadscientist.com).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechninja%2Fcncserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechninja%2Fcncserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechninja%2Fcncserver/lists"}