Skip to content

Instantly share code, notes, and snippets.

@k1r0s
Created August 26, 2018 11:25
Show Gist options
  • Save k1r0s/b79d131a0552103c87af1fcd2074ade1 to your computer and use it in GitHub Desktop.
Save k1r0s/b79d131a0552103c87af1fcd2074ade1 to your computer and use it in GitHub Desktop.
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