Giter Site home page Giter Site logo

jeanlescure / fasthr Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 1.59 MB

A fast and tiny CLI tool to easily spin up a hot reload http server on the current directory

Home Page: https://www.npmjs.com/package/fasthr

JavaScript 21.23% TypeScript 78.77%
fast hotreload livereload-server oneliner http-server nodejs javascript typescript cli

fasthr's Introduction

Fast Hot Reload CLI Logo

Fast Hot Reload (fasthr)

This is a tiny (6.5kb) CLI tool that mixes together no-bs-typescript-server-boilerplate, fastify, and livereload to easily spin up a hot reload http server on the current directory.

Like this project? ❤️

Please consider:

System dependencies

Usage

With npx you can use as a one-liner:

$ npx fasthr

Alternatively

Install globally:

$ npm install -g fasthr

then run:

# Start the server on the current directory on port 3000
$ fasthr

# Start the server on the current directory on port 8080
$ fasthr -p 8080

Options

Run help trigger for more info:

$ fasthr -h

Usage:
  node fasthr [OPTION]

Options:
  -d, --dir=ARG      root directory where to serve files from (default: current directory).
  -p, --port=ARG     port to run server on (default: 3000).
  -a, --address=ARG  address to run server on (default: 0.0.0.0).
  -l, --livePort=ARG port to run livereload on (default: 35729).
  -h, --help         display this help

Development

I chose Rollup to handle the transpiling, compression, and any other transformations needed to get this repo's Typescript code running as quickly and performant as possible.

yarn dev

Runs Rollup in watch mode which means it will hot-reload the server as you modify your source! This includes running node with the --inspect flag so you can inspect your code using Google Chrome Dev Tools (by opening chrome://inspect in your browser), you're welcome ;)

Contributing

Yes, thank you! Projects like this thrive when they are community-driven.

Please update the docs and tests and add your name to the package.json file on any PR you submit.

fasthr's People

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.