Clan is a super succinct, no-dependency set of utilities with a slightly opinionated collection of features that integrate particularly well when used together.
The Clan O'Server builds on these small functional compositions to create a super-tiny and agile server. Most everything is built aloft the Observable implementation of clan-fp
. See the Details below about adding routes, serving files, creating sync and async middleware, and more.
yarn add clan-server
# or
npm install --save clan-server
Here's a nice way to get started:
mkdir <new project dir>
cd <project dir>
npm init
yarn add clan-server
touch server.js
Then checkout test.js for an example of importing and using clan-server
.
- Fork this repository to your own GitHub account and then clone it to your local device
- Install the dependencies:
yarn
- Bundle the source code and watch for changes:
npm start
After that, you'll find the code in the ./build
folder!
- Matthew Keas, @matthiasak. Need help / support? Create an issue or ping on Twitter.