Skip to content

Instantly share code, notes, and snippets.

View ShinyChang's full-sized avatar
🏠
Working from home

Shiny ShinyChang

🏠
Working from home
View GitHub Profile
require('dotenv').config();
const https = require('https');
const path = require('path');
const fs = require('fs');
const Express = require('express');
const app = new Express();
app.get('/', (req, res) => res.send('Hello World!!'));
echo "NODE_EXTRA_CA_CERTS=$(mkcert -CAROOT)/rootCA.pem" >> .env
ngrok http 80
module.exports = {
...
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: [
'thread-loader',
'babel-loader'
module.exports = {
...
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: [
'thread-loader',
'babel-loader'
const threadLoader = require('thread-loader');
threadLoader.warmup({
// pool options, like passed to loader options
// must match loader options to boot the correct pool
}, [
// modules to load
// can be any module, i. e.
'babel-loader',
'babel-preset-es2015',
...
const threadLoader = require('thread-loader');
const jsWorkerPool = {
poolTimeout: 2000
};
const cssWorkerPool = {
workerParallelJobs: 2,
poolTimeout: 2000
module.exports = {
module: {
rules: [
{
test: /\.js$/,
use: ['cache-loader', 'babel-loader'],
include: path.resolve('src'),
},
],
},
{
"debug": true,
"show_panel_on_save": "view",
"linters": {
"eslint": {
"args": [
"--rule",
"import/no-unresolved: 0",
"--rule",
"import/no-cycle: 0",
{
"defaults": {
"custom_template_tags": false,
"flow_types": false,
"jsx": false,
},
"configurations": {
"Default": {},
"React": {