1.0.0 • Published 6 years ago

grokodile v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

:crocodile: grokodile :crocodile:

get your code/website publicly accessible while developing

install / setup

to run in your project:

$ npx grokodile

or you can install it globally and run it quickly whenever you want:

$ npm install -g grokodile
$ grokodile

the default config runs a local dev server on port 3000 and builds your project with npm run build. it assumes your build script puts files to be served in the directory ./build.

you can override any of these settings by creating a config file for your project by creating a .grokodile.json file.

(optionally, you could name the file anything and tell grokodile with the --config <file> option.)

config options

optiondescriptiondefault
portthe port the local dev server will listen on3000
buildthe command grokodile should run to build your projectnpm run build
paththe path to serve (where the built files are)./dist
httpServerenable/disable the local dev http servertrue

sample config file

this sample config file uses parcel for the builder and doesn't enable grokodile's built-in http server because parcel automatically starts one on port 1234 (note we specify the port even though the http server is disabled, because it is needed for ngrok).

{
  "build": "parcel",
  "httpServer": false, 
  "port": 1234
}

what's happening

  • start a local http server that serves static files
  • connect ngrok so the server is accessible on the internet
  • run your build script (which should be set up to watch files and rebuild)

license

MIT