diff --git a/node-express/allocator.js b/node-express/allocator.js new file mode 100644 index 0000000..b7efed2 --- /dev/null +++ b/node-express/allocator.js @@ -0,0 +1,20 @@ +class Allocator { + + constructor() { + + } + + // given a server type ('API', 'DB', etc) allocate a new server and + // return the name of the server (e.g. 'API1', 'API2', 'DB5') + allocate(serverType) { + + } + + // given a server name, remove the server from the pool + deallocate(serverName) { + + } + +} + +module.exports = Allocator; \ No newline at end of file diff --git a/node-express/index.js b/node-express/index.js index df0b9fe..2ccffa2 100644 --- a/node-express/index.js +++ b/node-express/index.js @@ -2,6 +2,8 @@ const express = require('express'); const app = express(); const port = 3000; +const Allocator = require('./allocator'); + app.get('/', (req, res) => res.send('Hello World!')); app.listen(port, () => console.log(`Example app listening on port ${port}!`)); \ No newline at end of file