# razzle-start-server-webpack-plugin

> Automatically start your server once Webpack's build completes.

Latest version **4.2.18** (published 2022-10-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install razzle-start-server-webpack-plugin
pnpm add razzle-start-server-webpack-plugin
yarn add razzle-start-server-webpack-plugin
bun add razzle-start-server-webpack-plugin
```

## Health

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

Positive: no vulnerabilities; popular repo.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.2.18 |
| Published | 2022-10-25 |
| First published | 2020-10-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 19.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 11020 |
| Author | Eric Clemmons |
| Maintainers | razzle-bot |
| Keywords | webpack, server, start, watch, restart, express |

## Links

- npm: https://www.npmjs.com/package/razzle-start-server-webpack-plugin
- Repository: https://github.com/jaredpalmer/razzle
- Issues: https://github.com/jaredpalmer/razzle/issues
- npm.io page: https://npm.io/package/razzle-start-server-webpack-plugin

## Alternatives

- [lodash.startswith](https://npm.io/package/lodash.startswith.md) — 769.7K weekly downloads
- [@tarojs/service](https://npm.io/package/@tarojs/service.md) — 33.9K weekly downloads
- [io.extendreality.tilia.indicators.spatialtargets.unity](https://npm.io/package/io.extendreality.tilia.indicators.spatialtargets.unity.md) — 131 weekly downloads
- [@rtarojs/taro](https://npm.io/package/@rtarojs/taro.md) — 90 weekly downloads
- [node-branch-io](https://npm.io/package/node-branch-io.md) — 50 weekly downloads

## Recent versions

- 4.2.18 (latest) — 2022-10-25
- 4.0.1-canary.15 (canary) — 2021-03-12
- 4.2.17 — 2022-05-20
- 4.2.16 — 2022-03-01
- 4.2.15 — 2022-02-16
- 4.2.14 — 2022-01-20
- 4.2.13 — 2021-12-20
- 4.2.12 — 2021-12-20
- 4.2.11 — 2021-12-20
- 4.2.10 — 2021-12-20
- 4.2.9 — 2021-12-20
- 4.2.8 — 2021-12-04
- 4.2.7 — 2021-11-10
- 4.2.6 — 2021-10-31
- 4.2.5 — 2021-10-27
- … 69 more at https://npm.io/package/razzle-start-server-webpack-plugin/versions

## README

# start-server-webpack-plugin

> Automatically start your server once Webpack's build completes + handle hot reloading (HMR)

[![travis build](https://img.shields.io/travis/ericclemmons/start-server-webpack-plugin.svg)](https://travis-ci.org/ericclemmons/start-server-webpack-plugin)
[![version](https://img.shields.io/npm/v/start-server-webpack-plugin.svg)](http://npm.im/start-server-webpack-plugin)
[![downloads](https://img.shields.io/npm/dm/start-server-webpack-plugin.svg)](http://npm-stat.com/charts.html?package=start-server-webpack-plugin)
[![MIT License](https://img.shields.io/npm/l/start-server-webpack-plugin.svg)](http://opensource.org/licenses/MIT)

### Installation

```shell
$ npm install --save-dev start-server-webpack-plugin
```

### Usage

In `webpack.config.server.babel.js`:

```js
import StartServerPlugin from "start-server-webpack-plugin";

export default {
  ...
  plugins: [
    ...
    // Only use this in DEVELOPMENT
    new StartServerPlugin({
      // print server logs
      verbose: true,
      // print plugin/server errors
      debug: false,
      // name of the entry to run, defaults to 'main'
      entryName: 'server',
      // any arguments to nodejs when running the entry, this one allows debugging
      nodeArgs: ['--inspect-brk'],
      // any arguments to pass to the script
      scriptArgs: ['scriptArgument1', 'scriptArgument2'],
      // Allow typing 'rs' to restart the server. default: only if NODE_ENV is 'development'
      restartable: true | false,
      // Only run the server once (default: false)
      once: false | true,
    }),
    ...
  ],
  ...
}
```

The `entryName` argument defaults to `"main"`, which is the name Webpack uses if you use the string or array versions of the `entry` option.

You can use `nodeArgs` and `args` to pass arguments to node and your script, respectively. For example, you can use this to use the node debugger.

To use Hot Module Reloading with your server code, set Webpack to "hot" and "watch" modes.
This plugin appends some code to the end of the entry so that it can handle HMR and restarts; no need to add any of the `webpack/hot` modules.

### Upgrading from v2

- Remove the `name` option and define `entryName` if it's not just `"main"`
- Remove any hot reloading additions

### License

> MIT License 2016-2018 © Eric Clemmons

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