This tiny server allows you to create function handlers that will act like Next.js API routes - without Next.js.
Routing is file system based, so all you have to do is to create a new file for a route in /src/api
.
$ npx create-mize-app app-name
or
$ yarn create mize-app app-name
Development server:
$ yarn dev
Build dist version:
$ yarn build
Start dist version server:
$ yarn start
Routing is file system based. Thanks to jesseditson/fs-router.
Secure your API easily by setting the MIZE_API_KEY
environmental variable.
Then send your requests with Authorization
header like: Mize [MIZE_API_KEY]
.
Please referr to apps/example-app
Run locally:
$ docker build -t mize .
$ docker run -p 3000:3000 mize
The repo contains Procfile
, so you're good to deploy it to Heroku.