1.1.2 • Published 7 years ago
solit v1.1.2
Getting started
npm install --save solitThen add this to your scripts
"scripts": {
"dev": "solit",
"build": "solit build",
"start": "solit start"
}Then add a src/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 run solit, solit build, or solit start straight from the command line.
Configuration
Add a solit.config.js file in the directory of your package.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 to spawn-server-webpack-plugin, backpack, and nuxt for the inspiration and help.
1.1.2
7 years ago
1.1.1
7 years ago
1.1.0
7 years ago
1.0.4
8 years ago
1.0.3
8 years ago
1.0.2
8 years ago
1.0.1
8 years ago
1.0.0
8 years ago
1.0.0-rc.1
8 years ago
1.0.0-rc.0
8 years ago
0.0.1-alpha.4
8 years ago
0.0.1-alpha.3
8 years ago
0.0.1-alpha.2
8 years ago
0.0.1-alpha.1
8 years ago