We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Starting a http server on the builder allow create new routes over http, just like wiremock does.
Example:
// server.js const path = require("path"); const http = require("http"); const Parser = require("./lib/parser"); const FileWriter = require("./lib/fileWriter")(path.join(__dirname, "resources/mappings")); const parserInstance = new Parser(FileWriter); http.createServer((req, res) => { res.writeHead(200, {'Content-Type': 'text/html'}); let bodyChunks = []; let body; req.on('data', function (data) { bodyChunks.push(data); }) .on('end', function () { body = JSON.parse(Buffer.concat(bodyChunks).toString()); parserInstance.parse(body.route); const end = () => { res.write("ok"); res.end(); }; // reload mappings http.request({ hostname: "server", port: 80, path: '__admin/mappings/reset', method: 'POST' }, end); }); }).listen(80);
curl -X POST http://localhost:80/route -H "Content-Type: application/json" -d '{"route": {"name": "foo"}}'
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Starting a http server on the builder allow create new routes over http, just like wiremock does.
Example:
The text was updated successfully, but these errors were encountered: