mrmeku 71e0df039c feat(bazel): Initial commit of protractor_web_test_suite (#24787)
Co-authored-by: Andrew Z Allen <me@andrewzallen.com>

PR Close #24787
2018-07-12 16:34:45 -04:00

30 lines
689 B
JavaScript

/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @fileoverview A demo of what a user's conf.js file might look like.
*/
const http = require('http');
const PORT = 3000;
exports.config = {
baseUrl: `http://localhost:${PORT}`,
onPrepare() {
const app = new http.Server();
app.on('request', (req, res) => {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.write('Hello World');
res.end('\n');
});
return new Promise(resolve => { app.listen(PORT, () => { resolve(); }); });
}
};