New issue

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

fix: koa render decorator #434

Open
wants to merge 10 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@Jiasm

Jiasm commented Aug 26, 2018

When @Render exec, that will add a new middleware.
Just call render to return results.

fix: koa render decorator
When `@Render` exec, that will add a new `middleware`.
Just call `render` to return results.
@Jiasm

This comment has been minimized.

Jiasm commented Aug 26, 2018

That a big bugs [#378].

Please merge it.

A little change to use:

const koa = new Koa()
koa.use(koaViews(path.join(__dirname, '../views'), {
  options: {
    ext: 'ejs',
  },
  extension: 'ejs',
}))

const app = useKoaServer(koa, {
  controllers: [`${__dirname}/controllers/**/*{.js,.ts}`],
})

app.use(serve(distPath))
app.use(bodyParser())
@19majkel94

This comment has been minimized.

Member

19majkel94 commented Aug 26, 2018

@Jiasm Changes looks good but the tests for render on koa and older node.js versions fails (HTTP error 500). Could you check out this and fix it?

@Jiasm

This comment has been minimized.

Jiasm commented Aug 26, 2018

@19majkel94 I will fixed it at tomorrow.
Now is 22:40 :) (I'm in China)


Thinking for a moment, I decided to check at it now :p

Jiasm added some commits Aug 26, 2018

Update package.json
Add http2 supports.
In node6.x is required.
@Jiasm

This comment has been minimized.

Jiasm commented Aug 26, 2018

@19majkel94 The Travis CI hang on too long time :(

@19majkel94

This comment has been minimized.

Member

19majkel94 commented Aug 26, 2018

@Jiasm I see but I don't know what's going on 😕

@Jiasm

This comment has been minimized.

Jiasm commented Aug 26, 2018

Finally... it worked.
I'm going to bed, good night.

@19majkel94 Please merge it.
Although this is still a temporary solution, I will try a better way to fix it, and I will change more files to complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment