MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / constructor

Method constructor

lib/test-server.js:10–23  ·  view source on GitHub ↗
(config = {})

Source from the content-addressed store, hash-verified

8 */
9class TestServer {
10 constructor(config = {}) {
11 this.app = express()
12 this.server = null
13 this.port = config.port || 8010
14 this.host = config.host || 'localhost'
15 this.dbFile = config.dbFile || path.join(__dirname, '../test/data/rest/db.json')
16 this.readOnly = config.readOnly || false
17 this.lastModified = null
18 this.data = this.loadData()
19
20 this.setupMiddleware()
21 this.setupRoutes()
22 this.setupFileWatcher()
23 }
24
25 loadData() {
26 try {

Callers

nothing calls this directly

Calls 4

loadDataMethod · 0.95
setupMiddlewareMethod · 0.95
setupRoutesMethod · 0.95
setupFileWatcherMethod · 0.95

Tested by

no test coverage detected