Set threadpool size in server.js

old
Javi Jimenez Villar 2015-10-28 23:21:51 +07:00
parent 2423d09a4f
commit bec58a3bec
2 changed files with 5 additions and 3 deletions

View File

@ -1,13 +1,13 @@
{ {
"name": "react-toolbox", "name": "react-toolbox",
"version": "0.10.20", "version": "0.10.28",
"description": "A set of complementary tools to ReactJS.", "description": "A set of complementary tools to ReactJS.",
"author": "React Toolbox Team (http://github.com/react-toolbox)", "author": "React Toolbox Team (http://github.com/react-toolbox)",
"contributors": [ "contributors": [
{ {
"name": "Javi Jimenez Villar", "name": "Javi Jimenez Villar",
"url": "http://soyjavi.com/", "url": "http://soyjavi.com/",
"email": "hi@soyjavi.com" "email": "javi.jimenez.villar@gmail.com"
}, },
{ {
"name": "Javi Velasco Arjona", "name": "Javi Velasco Arjona",
@ -17,7 +17,7 @@
], ],
"main": "./lib", "main": "./lib",
"scripts": { "scripts": {
"start": "UV_THREADPOOL_SIZE=100 node ./server", "start": "node ./server",
"babel": "babel ./components --out-dir ./lib", "babel": "babel ./components --out-dir ./lib",
"build": "npm run lint && npm run babel && npm run sass", "build": "npm run lint && npm run babel && npm run sass",
"clean": "rimraf ./lib", "clean": "rimraf ./lib",

View File

@ -1,3 +1,5 @@
process.env.UV_THREADPOOL_SIZE = Math.ceil(Math.max(4, require('os').cpus().length * 1.5));
const webpack = require('webpack'); const webpack = require('webpack');
const WebpackDevServer = require('webpack-dev-server'); const WebpackDevServer = require('webpack-dev-server');
const config = require('./webpack.config.development'); const config = require('./webpack.config.development');