@@ -11,8 +11,9 @@ const ports = {
1111 fastify : 3011 ,
1212 polka : 3012 ,
1313 scrud : 3013 ,
14- express : 3014 ,
15- hapi : 3015
14+ 'scrud + turbo' : 3014 ,
15+ express : 3015 ,
16+ hapi : 3016
1617}
1718
1819const logStart = ( n ) => {
@@ -72,7 +73,7 @@ start.polka = () => {
7273}
7374
7475start . scrud = ( ) => {
75- const scrudOpts = { port : ports . scrud , turbo : true }
76+ const scrudOpts = { port : ports . scrud , turbo : false }
7677 const scrud = require ( 'scrud' )
7778 scrud . register ( 'user' , {
7879 create : ( req , res ) => scrud . sendData ( res , req . params . user ) ,
@@ -81,6 +82,16 @@ start.scrud = () => {
8182 scrud . start ( scrudOpts ) . then ( ( ) => logStart ( 'scrud' ) )
8283}
8384
85+ start [ 'scrud + turbo' ] = ( ) => {
86+ const scrudOpts = { port : ports [ 'scrud + turbo' ] , turbo : true }
87+ const scrud = require ( 'scrud' )
88+ scrud . register ( 'user' , {
89+ create : ( req , res ) => scrud . sendData ( res , req . params . user ) ,
90+ read : ( req , res ) => scrud . sendData ( res , toSend )
91+ } )
92+ scrud . start ( scrudOpts ) . then ( ( ) => logStart ( 'scrud + turbo' ) )
93+ }
94+
8495start . express = ( ) => {
8596 const express = require ( 'express' ) ( )
8697 express . get ( '/user/:id' , ( req , res ) => {
0 commit comments