All Projects → okwolf → Srvs

okwolf / Srvs

Licence: mit
Zero dependency dev server

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Srvs

Practical Server Side Swift
Vapor 4 code samples for the Practical Server Side Swift book
Stars: ✭ 133 (+432%)
Mutual labels:  modules, server
Go Modiff
Command line tool for diffing go module dependency changes between versions 📔
Stars: ✭ 24 (-4%)
Mutual labels:  modules
Deno Drash
A REST microframework for Deno's HTTP server with zero 3rd party dependencies.
Stars: ✭ 795 (+3080%)
Mutual labels:  server
Angular Universal Seed
Angular5 Universal Webpack Seed
Stars: ✭ 17 (-32%)
Mutual labels:  server
Dyson
Node server for dynamic, fake JSON.
Stars: ✭ 814 (+3156%)
Mutual labels:  server
Modules
📦 Modules package for Laravel
Stars: ✭ 900 (+3500%)
Mutual labels:  modules
Multi Model Server
Multi Model Server is a tool for serving neural net models for inference
Stars: ✭ 770 (+2980%)
Mutual labels:  server
React Styling Hoc
Механизм темизации для React-компонентов, написанных с использованием CSS модулей.
Stars: ✭ 25 (+0%)
Mutual labels:  modules
Debian Server
Complete Debian/Ubuntu Web Application Server Installation
Stars: ✭ 22 (-12%)
Mutual labels:  server
Orbit Db Http Api
A HTTP API Server for the OrbitDB distributed peer-to-peer database
Stars: ✭ 17 (-32%)
Mutual labels:  server
Eurythmia Server
Eurythmia server repository: mods, subgame, configuration, issues tracker, and a few other.
Stars: ✭ 7 (-72%)
Mutual labels:  server
Atscan
Advanced dork Search & Mass Exploit Scanner
Stars: ✭ 817 (+3168%)
Mutual labels:  server
Game Server
Distributed Java game server, including cluster management server, gateway server, hall server, game logic server, background monitoring server and a running web version of fishing. State machine, behavior tree, A* pathfinding, navigation mesh and other AI tools
Stars: ✭ 916 (+3564%)
Mutual labels:  server
Gonet
go分布式服务器,基于内存mmo
Stars: ✭ 804 (+3116%)
Mutual labels:  server
Diamond
System V-style runlevels for your Go daemons
Stars: ✭ 24 (-4%)
Mutual labels:  server
Webhook
webhook is a lightweight incoming webhook server to run shell commands
Stars: ✭ 7,201 (+28704%)
Mutual labels:  server
Hadoop For Geoevent
ArcGIS GeoEvent Server sample Hadoop connector for storing GeoEvents in HDFS.
Stars: ✭ 5 (-80%)
Mutual labels:  server
Github Webhook Listener
Light server for reacting to GitHub's Webhooks
Stars: ✭ 18 (-28%)
Mutual labels:  server
Hrscan2
A self-hosted drag-and-drop, nosql yet fully-featured file-scanning server.
Stars: ✭ 25 (+0%)
Mutual labels:  server
Skillbox Chat 08 19
Skillbox demo application for the Python course
Stars: ✭ 25 (+0%)
Mutual labels:  server

srvs serves modern webapps for dev, with none of the fat

Build Status codecov npm

srvs is a zero dependency dev server with support for static content in addition to JavaScript modules hosted from local files and unpkg.com.

Installation

Global

npm i -g srvs

Then you may run with:

srvs

npx

No install required, just run:

npx srvs

(npx comes with npm 5.2+ and higher.)

Local

Install with npm / Yarn:

npm i -D srvs

Then add srvs to the scripts in your package.json:

"scripts": {
  "start": "srvs"
}

Now you may run with:

npm start

Usage

Command Line

Here are the available command line arguments:

Argument Usage Default
port The port on which the dev server will listen. 8080
docRoot The relative path from which static assets such as index.html will be served. public
scriptRoot The relative path from which local JavaScript modules will be served. src

Each argument is passed in the form --argument=value. Here is an example using all available arguments:

npx srvs --port=3000 --docRoot=static --scriptRoot=js

API

srvs offers a programmatic way to integrate running with existing JavaScript code.

You may bring in the srvs API function using import if you have support for ES6 syntax:

import srvs from "srvs";

srvs(options).then(config => {
  // dev server is now open for business
});

Or using require:

const srvs = require("srvs");

srvs(options).then(config => {
  // dev server is now open for business
});

The options object has the same properties and values as the arguments supported by the command line version. The config parameter provided to the resolved Promise has the same properties as options.

Notes

  • This is only for use as a development tool, please do not use in production.
  • The docRoot and scriptRoot options will fall back to the current directory if they don't exist.
  • If you intend to use dynamic import (as the examples/hot project does) to hot reload changed modules, be aware this is not supported by some browsers.
  • The BROWSER environment variable can be used to control which application to open your page in, or set to none to disable browser opening entirely. This feature is inspired by the popular create-react-app.

License

srvs is MIT licensed. See LICENSE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].