npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

grbljs

v0.1.0

Published

<img src="https://raw.githubusercontent.com/cho45/GrblServer/master/browser/src/assets/icon-192.png"/>

Downloads

4

Readme

GrblServer

GrblServer is a Grbl interface for standalone gcode execute service which works with nodejs.

GrblServer provides:

  • WebSocket APIs
  • Multiple session for one Grbl (broadcast Grbl state to all clients) This is useful for show state in multiple view (eg. local LCD and remote browsers)

Overview

Standalone WebApp

By "Add to Home screen" feature on Chrome for Android.

Responsive View

Install & Basic Usage

You must install node.js and git.

Clone repository to local

git clone https://github.com/cho45/GrblServer.git

Install dependencies

cd GrblServer
npm install

Configure

Create config/local.json. You must edit "serialPort" path.

cp config/default.json config/local.json
vi config/local.json

Run GrblServer

You should connect Grbl installed Arduino before running.

node bin/grbl-server.js

Open client by browser

Google Chrome is recommended for performance.

open http://localhost:8080/

(GrblServer also serves static files under ./browser)

Configuration

serverPort

Specify WebSocket/HTTP server port to serve.

serialPort

Specify serial port path which is connected to Grbl.

serialBaud

Specify serial baudrate to Grbl.

You want to write configuration with other formats? You can: https://github.com/lorenwest/node-config/wiki/Configuration-Files

TLSKey, TLSCert

Specify TLS key/cert for HTTP2. Default is empty (disabled).

GrblServer includes localhost cert (self signed certificates). Use it by following:

"TLSKey" : "dev/server.key",
"TLSCert" : "dev/server.crt" 

Or create self signed certificates by dev/make-key.sh.

Usecases

with Raspberry Pi

Setup

Ensure that NodeJS has been installed on the Rapsberry Pi (https://learn.adafruit.com/node-embedded-development/installing-node-dot-js)

Clone GrblServer on Raspberry Pi:

mkdir app
cd app
git clone https://github.com/cho45/GrblServer.git
cd GrblServer
npm install
vi config/local.json

Edit /etc/inittab to auto login by user pi:

sudo vi /etc/inittab

# comment out following line:
# 1:2345:respawn:/sbin/getty --noclear 38400 tty1 
# and add following line:
1:2345:respawn:/bin/login -f pi tty1 </dev/tty1 >/dev/tty1 2>&1

Edit /etc/rc.local to auto launch GrblServer:

sudo vi /etc/rc.local
# add following line before exit
sudo -u pi /home/pi/app/GrblServer/service/grbl-server.sh

Development

GrblServer is written in TypeScript.

sudo npm install -g typescript
npm install
make watch # tsc watch
make server # launch websocket/http server

browser client is written JavaScript with Polymer

Above make server also serves static files under browser/.

Grbl for development

You may need actual connection to Grbl. But you should not connect to Grbl which connected to powered CNC machine. So I suggest you to make another Grbl installed Arduino and use it for development.

Grbl is open-loop control except homing and probing. It means you don't need to connect actual CNC machine in most case.

Contribute

Send pull-request.

LICENSE

MIT: http://cho45.github.com/mit-license