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
The Server component is in charge of connect all the other Kakapo pieces. A real example could be something like:
import {Router, DB, Server} from 'Kakapo'; const db = new DB(); db.register('user', (faker) => { return { firstName: faker.name.firstName, lastName: 'Zarco', avatar: faker.internet.avatar, age: 24 }; }); const router = new Router({host: 'custom'}); router.get('/users/', (request, db) => { return db.all('user'); }); router.get('/users/:user_id', (request, db) => { return db.find('user', request.params.id); }); router.post('/users/', (request, db) => { const createdUser = db.create('user', request.body.user.id); return createdUser; }); const server = new Server({requestDelay: 500}); server.use(db); server.use(router);
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The Server component is in charge of connect all the other Kakapo pieces. A real example could be something like:
The text was updated successfully, but these errors were encountered: