Socket
Socket
Sign inDemoInstall

fasthr

Package Overview
Dependencies
105
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    fasthr

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


Version published
Weekly downloads
126
increased by59.49%
Maintainers
1
Install size
7.50 MB
Created
Weekly downloads
 

Changelog

Source

1.2.0 (2021-05-14)

Features

  • add quiet flag (46493ff)

Readme

Source

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.

FAQs

Last updated on 14 May 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc