Skip to content

Commit

Permalink
chore: adjust readme
Browse files Browse the repository at this point in the history
  • Loading branch information
chakhsu committed Nov 15, 2023
1 parent 9417f9b commit a00e7ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,6 @@ Then, create `server.js` and write the following code in it:
import loader from './loader.js'

class Greeter {
constructor(loader) {
this._loader = loader
}

init(server) {
server.addService('helloworld.Greeter', this, { exclude: ['init'] })
}
Expand All @@ -115,7 +111,7 @@ const start = async (addr) => {
await loader.init()

const server = loader.initServer()
const servicers = [new Greeter(loader)]
const servicers = [new Greeter()]
await Promise.all(servicers.map(async s => s.init(server)))

await server.listen(addr)
Expand Down
6 changes: 1 addition & 5 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,6 @@ export default new GrpcLoader({
import loader from './loader.js'

class Greeter {
constructor(loader) {
this._loader = loader
}

init(server) {
server.addService('helloworld.Greeter', this, { exclude: ['init'] })
}
Expand All @@ -114,7 +110,7 @@ const start = async (addr) => {
await loader.init()

const server = loader.initServer()
const servicers = [new Greeter(loader)]
const servicers = [new Greeter()]
await Promise.all(servicers.map(async s => s.init(server)))

await server.listen(addr)
Expand Down

0 comments on commit a00e7ae

Please sign in to comment.