forked from docsifyjs/docsify
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.js
More file actions
Latest commit
14 lines (11 loc) Β· 552 Bytes
/
Copy pathserver.js
File metadata and controls
14 lines (11 loc) Β· 552 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import{create}from'browser-sync';
import{devConfig,prodConfig}from'./server.configs.js';
constbsServer=create();
constargs=process.argv.slice(2);
constconfig=args.includes('--dev') ? devConfig : prodConfig;
constconfigName=config===devConfig ? 'development' : 'production';
constisWatch=Boolean(config.files)&&config.watch!==false;
consturlType=config===devConfig ? 'local' : 'CDN';
// prettier-ignore
console.log(`\nStarting ${configName} server (${urlType} URLs, watch: ${isWatch})\n`);
bsServer.init(config);