Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Lighter-than-air node.js server framework

License

NotificationsYou must be signed in to change notification settings

articulate/paperplane

Repository files navigation

paperplane

Lighter-than-air node.js server framework.

npm versionnpm downloadsBuild StatusCoverage Status

Documentation

Introduction

The main goal ofpaperplane is to make building anode.js server easy, without all of the configuration or imperative boilerplate required for other server frameworks. If you prefer to build apps with function composition or even a point-free style, thenpaperplane is for you.

Withpaperplane you get all of these out-of-the-box:

Let's try a quick Hello World example server. It accepts a:name param in the url, and then includes that name in thejson response body.

const{ compose}=require('ramda')consthttp=require('http')const{ json, logger, methods, mount, routes}=require('paperplane')consthello=req=>({message:`Hello${req.params.name}!`})constapp=routes({'/hello/:name':methods({GET:compose(json,hello)})})http.createServer(mount({ app})).listen(3000,logger)

So simple and functional, with an easily readable routing table and pure functions for the route handler. If that sounds like fun to you, then read theGetting started guide or theAPI docs to learn more.

Example application

To help you learn the concepts used in paperplane, check out thedemo application.

If you have docker installed, you can run the demo locally:

  1. Clone this repo
  2. If you're using Docker Desktop for Windows:
    • cp docker-compose.override.windows.yml docker-compose.override.yml
  3. docker-compose up
  4. http://localhost:3000

About

Lighter-than-air node.js server framework

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors11


[8]ページ先頭

©2009-2025 Movatter.jp