This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path') | |
const webpack = require('webpack') | |
const HtmlWebPackPlugin = require('html-webpack-plugin') | |
const ErrorOverlayPlugin = require('error-overlay-webpack-plugin') | |
module.exports = { | |
devtool: 'cheap-module-source-map', | |
mode: 'development', | |
entry: { | |
index: './src/index.js', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"presets": [ | |
"env", | |
"react", | |
"stage-2" | |
], | |
"plugins": [ | |
"transform-react-jsx-source" | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ════════════════════════════════════════════════════════════════════════════════════════════════╡ | |
const Hapi = require('hapi') | |
const Inert = require('inert') | |
const chalk = require('chalk') | |
const path = require('path') | |
// ════════════════════════════════════════════════════════════════════════════════════════════════╡ | |
// Set path to production build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"crypto/sha256" | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
"strconv" | |
"github.com/labstack/echo" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ════════════════════════════════════════════════════════════════════════════════════════════════╡ | |
const { parentPort, workerData } = require('worker_threads') | |
const crypto = require('crypto') | |
const util = require('util') | |
const fs = require('fs') | |
// ════════════════════════════════════════════════════════════════════════════════════════════════╡ | |
const asyncFs = util.promisify(fs.readFile) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ktor.benchmark | |
/* ktlint-disable no-wildcard-imports */ | |
import io.ktor.application.* | |
import io.ktor.response.* | |
import io.ktor.request.* | |
import io.ktor.routing.* | |
import io.ktor.http.* | |
import io.ktor.locations.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"net/http" | |
"runtime" | |
) | |
func ok(w http.ResponseWriter, req *http.Request) { | |
fmt.Fprintf(w, "OK") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"net/http" | |
"runtime" | |
) | |
func ok(w http.ResponseWriter, req *http.Request) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const http = require('http') | |
const host = '192.168.0.14' | |
const port = 3000 | |
const start = function startServer() { | |
// Simple request router | |
const router = function requestRouter(request, reply) { | |
reply.end('OK') | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const cluster = require('cluster') | |
const http = require('http') | |
const numCPUs = require('os').cpus().length | |
const host = '192.168.0.14' | |
const port = 3000 | |
const start = async function startServer() { | |
// Cluster | |
if (cluster.isMaster) { |
OlderNewer