https://github.com/syuilo/dummy-server
https://github.com/syuilo/dummy-server
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/syuilo/dummy-server
- Owner: syuilo
- License: mit
- Created: 2020-12-01T02:12:53.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-12-02T03:34:20.000Z (over 5 years ago)
- Last Synced: 2025-01-21T11:45:16.515Z (over 1 year ago)
- Language: HTML
- Size: 14.6 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Dummy server
テストなどに使えるカスタマイズ可能な簡易サーバー
## Install
1. Install Node.js to your machine
1. Clone this repo
1. In your shell, `cd `
1. In your shell, `cp config-example config -r`
1. In your shell, `npm i`
1. In your shell, `npm run build`
1. Enjoy
## Usage
configディレクトリ内のディレクトリは`env`と呼ばれ、その中にサーバーが返すHTMLやヘッダー定義などが含まれています。
デフォルトでは[`default`というenv](https://github.com/syuilo/dummy-server/tree/master/config-example/default)が含まれています。
サーバーを起動するときは、読み込むenv名とポートを指定します。例:
`node . default 5000`