# next-serverless-server

> A plain Node.js server that serves a [Next.js](https://nextjs.org) app built for the `serverless` target.

Latest version **1.0.0-rc.1** (published 2019-10-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install next-serverless-server
pnpm add next-serverless-server
yarn add next-serverless-server
bun add next-serverless-server
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0-rc.1 |
| Published | 2019-10-16 |
| First published | 2019-10-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 78 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | linusu |

## Links

- npm: https://www.npmjs.com/package/next-serverless-server
- Repository: https://github.com/LinusU/next-serverless-server
- Homepage: https://github.com/LinusU/next-serverless-server#readme
- Issues: https://github.com/LinusU/next-serverless-server/issues
- npm.io page: https://npm.io/package/next-serverless-server

## Recent versions

- 1.0.0-rc.1 (latest) — 2019-10-16

## README

# Next.js Serverless Server

A plain Node.js server that serves a [Next.js](https://nextjs.org) app built for the `serverless` target.

## Installation

```sh
npm install --save next-serverless-server
```

## Usage

```js
const server = require('next-serverless-server')

server(__dirname).listen(3000, (err) => {
  if (err) throw err

  console.log('> Ready on http://localhost:3000')
})
```

## API

### `server(root: string): http.Server`

Creates a new `http.Server` with a request handler attached for serving the Next.js app.

The `root` argument should be the path to the folder of your app, that is the folder that _contains_ the `.next` folder.

Note that your Next.js app must be built with the `target: 'serverless'` option specified.

---
_Source: https://npm.io/package/next-serverless-server · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
