Created
August 26, 2018 11:25
-
-
Save k1r0s/b79d131a0552103c87af1fcd2074ade1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { setAdapter, AbstractResource } = require("@ritley/core"); | |
const Adapter = require("@ritley/standalone-adapter"); | |
setAdapter(Adapter, { | |
"port": 8080 | |
}); | |
class DefaultResource extends AbstractResource { | |
get(req, res) { | |
res.statusCode = 200; | |
res.end(`Hello from ${this.$uri}`); | |
} | |
} | |
new DefaultResource("/sessions"); | |
new DefaultResource("/users"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment