Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Hapi = require('hapi');
- const whoiser = require('whoiser');
- const server = Hapi.server({
- port: 8000,
- host: '37.228.117.188'
- });
- server.route({
- method: 'GET',
- path: '/{domain}',
- handler: request => {
- return whoiser(encodeURIComponent(request.params.domain));
- }
- });
- (async () => {
- await server.start()
- console.log(`Server running at: ${server.info.uri}`);
- })()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement