4.0.3 • Published 2 years ago
srpc-framework v4.0.3
Usage
const { createServer as createSrpcServer, callFunction } = require('srpc-framework')
const { createServer } = require('http') // or https
const functions = { add: ({ a, b }) => a + b }
const port = 8080
const onStartText = `Server successfully launched on port ${port}`
const handleErrors = result => {
if (result.error) {
console.log(error)
return 'Internal Server Error'
}
return result
}
const { listen: startServer } = createServer({ functions, createServer, callFunction: compose(callFunction, handleErrors) })
startServer(port, onStartText)
4.0.1
2 years ago
4.0.0
2 years ago
4.0.3
2 years ago
4.0.2
2 years ago
3.0.0
3 years ago
2.0.15
3 years ago
2.0.16
3 years ago
2.0.13
3 years ago
2.0.14
3 years ago
2.0.11
3 years ago
2.0.12
3 years ago
2.0.10
3 years ago
2.0.17
3 years ago
2.0.9
4 years ago
2.0.5
4 years ago
2.0.4
4 years ago
2.0.7
4 years ago
2.0.6
4 years ago
2.0.8
4 years ago
2.0.3
4 years ago
2.0.2
4 years ago
2.0.1
4 years ago
1.0.19
4 years ago
2.0.0
4 years ago
1.0.18
4 years ago
1.0.17
4 years ago
1.0.16
4 years ago
1.0.15
5 years ago
1.0.14
5 years ago
1.0.13
5 years ago
1.0.12
5 years ago
1.0.11
5 years ago
1.0.10
5 years ago
1.0.9
5 years ago
1.0.8
5 years ago
1.0.7
5 years ago
1.0.6
5 years ago
1.0.5
5 years ago
1.0.4
5 years ago
1.0.3
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago