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
defscrollback 30000 | |
termcapinfo xterm ti@:te@ | |
#overwrite default escape sequence of Ctrl-a to be Ctrl-o (Ctrl a is nice to keep as it brings you to start of line) | |
escape ^Oo | |
# Don't display the copyright page | |
startup_message off | |
# tab-completion flash in heading bar |
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
// @flow | |
import { Pageable, IndexablePage, paginate } from '@panderalabs/koa-pageable'; | |
import type { Context } from 'koa'; | |
import Koa from 'koa'; | |
import Router from 'koa-router' | |
const app = new Koa(); | |
const router = new Router(); | |
app | |
.use(router.routes()) |
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
// @flow | |
import { IndexablePage, Pageable, Sort, } from '@panderalabs/koa-pageable'; | |
import type { QueryBuilder } from 'objection'; | |
function getData(pageable: Pageable): IndexablePage<number, Person> { | |
const pageNumber = pageable.page; | |
const pageSize = pageable.size; | |
const sort: Sort = pageable.sort; | |
const queryBuilder: QueryBuilder = Person.query().where('age', '>=', 21).page(pageNumber, pageSize); |
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
{ | |
"number": 1, | |
"size": 2, | |
"sort": [ | |
{ | |
"direction": "asc", | |
"property": "firstname" | |
}, | |
{ | |
"direction": "lastname", |
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
{ | |
"number": 1, | |
"size": 2, | |
"sort": [ | |
{ | |
"direction": "asc", | |
"property": "firstname" | |
}, | |
{ | |
"direction": "lastname", |