mirror of
https://github.com/remoteintech/remote-jobs
synced 2024-12-27 04:43:09 +00:00
20 lines
502 B
JavaScript
20 lines
502 B
JavaScript
|
#!/usr/bin/env node
|
||
|
|
||
|
const { spawnSync } = require( 'child_process' );
|
||
|
const path = require( 'path' );
|
||
|
|
||
|
// Build the static site
|
||
|
const result = spawnSync( process.execPath, [
|
||
|
path.join( __dirname, 'build-site.js' ),
|
||
|
], { stdio: 'inherit' } );
|
||
|
if ( result.error ) {
|
||
|
throw result.error;
|
||
|
}
|
||
|
if ( result.status > 0 ) {
|
||
|
process.exit( result.status );
|
||
|
}
|
||
|
|
||
|
// Serve the static site locally
|
||
|
process.argv.splice( 2, 0, path.join( __dirname, '..', 'site', 'build' ) );
|
||
|
require( 'http-server/bin/http-server' );
|