Skip to content

mvr-studio/mize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mize: Lambda-esque functions

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.

Installation

$ npx create-mize-app app-name

or

$ yarn create mize-app app-name

Usage

Development server:

$ yarn dev

Build dist version:

$ yarn build

Start dist version server:

$ yarn start

Features

Routing

Routing is file system based. Thanks to jesseditson/fs-router.

Security

Secure your API easily by setting the MIZE_API_KEY environmental variable. Then send your requests with Authorization header like: Mize [MIZE_API_KEY].

Example

Please referr to apps/example-app

Deployment

Dockerfile

Run locally:

$ docker build -t mize .
$ docker run -p 3000:3000 mize

Heroku and Herokuish

The repo contains Procfile, so you're good to deploy it to Heroku.