519c411db0
* feat: sync and update with all changes from fork * refactor: extract clipboard copy logic into custom hook * fix: correct spelling of DEFAULT_REFRESH_FREQUENCY_MS in Stamps and WalletBalance providers * refactor(ui-tests): replace fixed sleeps with condition-based waits * fix: handle null values for size and granteeCount in infoGroups * fix(lint): add newline at end of file in useClipboardCopy hook * fix(ui-tests): page.goto URL * refactor: update import paths for useClipboardCopy --------- Co-authored-by: Ferenc Sárai <sarai.ferenc@gmail.com>
38 lines
903 B
JavaScript
Executable File
38 lines
903 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
/* eslint-disable no-console */
|
|
/* eslint-disable @typescript-eslint/no-require-imports */
|
|
|
|
const path = require('path')
|
|
const handler = require('serve-handler')
|
|
const http = require('http')
|
|
const opener = require('opener')
|
|
|
|
const port = process.env.PORT || 8080
|
|
|
|
const serverConfig = {
|
|
public: path.join(__dirname, 'build'),
|
|
trailingSlash: false,
|
|
rewrites: [{ source: '**', destination: '/index.html' }],
|
|
headers: [
|
|
{
|
|
source: '*',
|
|
headers: [
|
|
{
|
|
key: 'Cache-Control',
|
|
value: 'max-age=3600',
|
|
},
|
|
],
|
|
},
|
|
],
|
|
}
|
|
|
|
const server = http.createServer((request, response) => {
|
|
return handler(request, response, serverConfig)
|
|
})
|
|
|
|
server.listen(port, () => {
|
|
console.log(`Starting up Bee Dashboard on address http://localhost:${port}`)
|
|
console.log('Hit CTRL-C to stop the server')
|
|
opener(`http://localhost:${port}`)
|
|
})
|