- Notifications
You must be signed in to change notification settings - Fork0
Hot module replacement on the server, in memory.
License
NotificationsYou must be signed in to change notification settings
rlindskog/solit
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Simple HMR on the server, in memory.
Getting started
npm install --save solitThen add this to your scripts
"scripts": { "dev": "solit", "build": "solit build", "start": "solit start"}Then add asrc/server/index.js directory
In that index.js file, add
import express from 'express'const app = express()app.get('/', (req, res) => { res.json({ hello: 'world' })})export default appAnd that is all!
Run in development
npm run devBuild for production
npm run buildRun in production
npm run startAlternatively, you can
npm install -g solitand runsolit,solit build, orsolit start straight from the command line.
Configuration
Add asolit.config.js file in the directory of yourpackage.json file.
then add
module.exports = { /* your sweet config */}The default configuration is
module.exports = { this.rootDir = './', this.srcDir = './src/server', this.buildDir = 'dist/server', this.filename = 'server.js', // output filename this.host = '127.0.0.1', this.port = 3000, this.env = {} // just HOST and PORT.}Big thanks tospawn-server-webpack-plugin,backpack, andnuxt for the inspiration and help.
About
Hot module replacement on the server, in memory.
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.