hostweb
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

HostWeb Logo

HostWeb

Simple localhost server with bundles

Docs | GitHub

NPM Downloads NPM Version License NPM Unpacked Size

About

HostWeb was created to serve .html, .md, .png and other files you can imagine! It also has a lightweight bundle system! Pack system is a set of bundles that you can use in your project (.hw files). It means that you can make whole website in just one file!

Why HostWeb?

  • Easy to use - hostweb has been designed to be easy to use.
  • Fast - HostWeb use express to serve files fast as possible, just like it's name!
  • Pre-configured - HostWeb is a pre-configured server, it means you don't have to set up anything.
  • Front-back integration - HostWeb comes with HWAPI - connection with frontend and backend.
  • Irreplaceable in education - HostWeb an is easy-to-use tool to learn how frameworks work and how to manage front-end and back-end, what is important in other technologies like electron.

Installation

npm i -g hostweb

Usage

serve

The base command is hostweb serve examples:

1. Serve a .md

hostweb serve example.md

It converts markdown to html and serves it.

2. Serve a .html

hostweb serve example.html

It serves html.

create

hostweb create command is used to create new preset.

1. Create new project

hostweb create example

It creates new project folder in current directory.

2. Create new project in current directory

hostweb create .

It creates new project in current directory.

build

hostweb build command is used to build your project.

hostweb build -o dist --debug

.hw file lands in dist directory, and enables debug mode to show additional info while compiling

.hostwebrc

It looks like this

file=hostwebrc ; I DARE YOU DO NOT TOUCH IT

[config]
name=my-project ; name of project (used by hw compiler)
usehwapi=true ; enable/disable hwapi (check next article to learn more)
ignore[]=README.md ; ignore files in ./src

[config.build]
type=classic ; type of build (now only classic)
usegzip=true ; enable/disable gzipping file (disable for debugging)
minify=true ; minify files like html, js, css etc.
parsemd=true ; parse md files (when you have md files it will parse it to html to view it in browser)

Learn more at docs.


Made with ❤️ by QwertyCodeQC

Dependents (0)

Package Sidebar

Install

npm i hostweb

Weekly Downloads

13

Version

2.0.0

License

ISC

Unpacked Size

354 kB

Total Files

21

Last publish

Collaborators

  • qwertycpl