项目作者: sure-thing

项目描述 :
Hyper minimal framework for the modern web.
高级语言: JavaScript
项目地址: git://github.com/sure-thing/presta.git
创建时间: 2020-08-08T19:02:05Z
项目社区:https://github.com/sure-thing/presta

开源协议:

下载


Presta

npm version

Minimalist serverless framework.

Features

  • flexible — APIs, server-rendered apps, static sites, etc
  • unopinionated — build whatever you want
  • no runtime — use any frontend framework
  • thin — not many features
  • small — easy to contribute to
  • extensible — simple plugin API
  • future-proof — TypeScript + deploy anywhere

Quick Start

Presta is just thin wrapper around AWS-flavored serverless functions + a simple
local dev server. Here’s a simple Presta file, which you can run right now with
npx presta dev index.ts:

  1. // index.ts
  2. import { Handler } from 'presta'
  3. export const route: string = '*'
  4. export const getStaticPaths: string[] = () => {
  5. return ['/']
  6. }
  7. export const handler: Handler = (ev, ctx) => {
  8. return {
  9. statusCode: 200,
  10. body: `You're looking at path ${ev.path}`,
  11. }
  12. }

Documentation

Docs can be found here in the repo. For the rest of the
ecosystem, see the following READMEs:

Contributing

We’d love your help getting Presta to v1.0.0. Have a look at the contributing doc or say hello in a new Issue. Also please review our code of conduct.

License

MIT License © Front of House