1. @tangbc/tiny-node-server
A tiny, simple and easyuse static server by nodejs.
@tangbc/tiny-node-server
Package: @tangbc/tiny-node-server
Created by: tangbc
Last modified: Thu, 07 Apr 2022 04:07:33 GMT
Version: 1.0.8
License: MIT
Downloads: 2
Repository: https://github.com/tangbc/tiny-node-server

Install

npm install @tangbc/tiny-node-server
yarn add @tangbc/tiny-node-server

tiny-node-server

⚖ A tiny, simple and easyuse static server by nodejs.

Install

npm install @tangbc/tiny-node-server --save-dev

Configuration

Just simply config tinyNodeServer in your package.json:

 {
  "name": "xxx",
  "version": "xxx",
  "description": "xxx",
  "script": {
    # --- add this script ---
    "server": "node node_modules/@tangbc/tiny-node-server",
    # --- or use bin alias ---
    "server": "tinyserver"
  },
  "tinyNodeServer": {
    "port": 8088,
    "root": "./",
    "log": 2
  },
  "author": "xxx"
}

Then, just npm run server!

Fields

Config tinyNodeServer fields:

Field Required Description
root The base dir to serve.
port * Listen port, default is 8088.
suffix * Output url suffix, default is ''.
log * Is show request log, default is 2, off to 1.

RELATED POST

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin