Comments (20)
@Aurelsicoko I didn't know about the leaks. Will definitely test this some more and follow the thread you mentioned.
from strapi.
Except for Lusca, the others middlewares have been updated and we can almost say that Strapi has successfully made the transition to Koa 2. I'm closing this issue because it's not relevant anymore. Thanks to everyone involved in it!
from strapi.
Updated koa-send
and koa-compose
as they now contain a v2 compatible branch.
Removed koa-load-middleware
from the list as it needs no updating to be compatible with koa v2.
from strapi.
Released koa-i18n@v2.
from strapi.
Awesome! Thanks for the update @fundon we appreciate.
from strapi.
I've exchanged koa-gzip
with koa-compress
here too (see #87) because we won't switch to koa v2 before Strapi 2.0 is released.
I also propose adding a Future
milestone and adding this Issue to it.
The reason is there is currently no estimate on when async/await will land in V8 and even worse in Node itself. Therefore this would delay Strapi 2.0 greatly.
from strapi.
@dj-hedgehog I agree with you. However I prefer to change the milestone when we'll work with our new OSS workflow. I'll write some blog posts about the v2, our vision and our goals to be completely honest and transparent with the community.
from strapi.
The situation keeps getting brighter koa-response-time, koa-static, koa-compress & koa-views all have respective branches for v2.x. I'll take care of some of the missing ones myself when I find the time.
from strapi.
I suggest moving from koa-ssl
to koa-sslify
. koa-sslify
looks more maintained and popular. The middleware offers more options such as Azure support and reverse proxies. We can't stay on an unused middleware without any update since 2 years.
from strapi.
Now, things are getting interesting as there is native async..await
support in the just released Node v7.
I suggest moving to Koa v2 now because that makes working with Strapi even easier. Also v3 isn't released yet.
from strapi.
@dj-hedgehog async/await
seems buggy on V8 5.4 and have some nasty memory leaks... I will create a branch koa@next
and start moving to Koa v2. Furthermore, it requires --harmony-async-await
flag to start. The harmony
flag is not recommended for production use. However, the strapi-v3@alpha
will not be ready for production use so it is not a real problem for now.
FYI, I'm following this thread on Koa's repository to get in touch.
from strapi.
I started my work on the branch improvement/koa2
. It works pretty well. It seems faster to load. Furthermore, we don't need generator functions into our controllers anymore.
I used koa-convert
to convert the middleware which are not ready to work with Koa2.
from strapi.
by the way koa-cors next branch
from strapi.
@StevenACoffman Thanks for the link! I was wondering if we should move to the official CORS's middleware for Koa (https://github.com/koajs/cors). It provides the exactly same features and this middleware is highly maintained by the Koa core team.
from strapi.
@Aurelsicoko Yeah, unless there is some sign of recent activity, I think you're probably right to switch to the official package. I hadn't realized the official project existed.
from strapi.
@StevenACoffman Me too... I moved to the official package today on the branch improvement/koa2
and it works fine!
from strapi.
FYI, we are using koa-generic-session instead of koa-session. Also, we are no longer using koa-graphql
by default. As I previously said, the GraphQL support will be available through a plugin.
Summary of changes we made:
- koa-static has been replaced by koa-better-static
- koa-cors has been replaced by kcors (official package)
- koa-session has been replaced by koa-generic-session
@dj-hedgehog I'll let you update the middlewares' list. Thanks for your time!
from strapi.
@Aurelsicoko I updated the list.
Since you have been using Koa v2 already with Strapi. What are your experiences so far? When do you plan to switch?
from strapi.
@dj-hedgehog Thank you so much! I can tell you that's Koa v2 could be a game changer in the next months. I'm very excited about the next release of Node without the harmony flag for async/await.
Here a summary of my feedback:
- Reducing the codebase (from 20% to 50% in some cases) thanks to async/await.
- The codebase is more readable and understandable.
- Better error handling. (Btw in v3, we created a errors middleware based on top of Boom which automatically formats the errors and considerably reduces the number of try/catch patterns in your codebase)
- I haven't notice performances improvements for now.
We should switch as soon as Node will allow using async/await without harmony flag. We are already working on big projects with [email protected]
. It's so nice and most natural to develop an application like that.
from strapi.
Hi, guys.
I have been trying to install Strapi V3 but I still have message erros like:
...
npm ERR! git rev-list -n1 v2.x: fatal: ambiguous argument 'v2.x': unknown revision or path not in the working tree.
npm ERR! git rev-list -n1 v2.x: Use '--' to separate paths from revisions, like this:
npm ERR! git rev-list -n1 v2.x: 'git [...] -- [...]'
...
I checked the packages been installed and the following situation came up: in the error message it was trying to install like 29 packages - and I tried to install manually all of them to test if they work properly.
In a list of 25 packages there were a couple with the .x
version.
npm install "koa-bodyparser@koajs/bodyparser#3.x"
npm install "koa-send@koajs/send#2.x"
They were installed just fine...
But there were 4 packages that do not install:
npm install "koa-compress@koajs/compress#v2.x"
npm install "koa-favicon@koajs/favicon#v2.x"
npm install "koa-response-time@koajs/response-time#v2.x"
npm install "koa-mount@koajs/mount#next"
They return the error reported above
Checking the GITHUB for these versions, one .x
version that works I can find it at Github. For example: "koa-bodyparser@koajs/bodyparser#3.x"
But the "koa-compress@koajs/compress#v2.x"
is not there, as follows:
Is it wrong? Long story short, those packages probably do not exist at all...
Another example?
"koa-response-time@koajs/response-time#v2.x"
from strapi.
Related Issues (20)
- Email field is disabled for new registration HOT 1
- Filters disabled when filtering for invalid / non existing input
- Keep trying error at strapi new project HOT 2
- [ STRAPI 5 BETA ] Components Created Show No Permission To See This Field
- Markdown Editor Auto-scrolls to top when formatting applied
- Upload plugin: value of "quality" parameter doesn't apply to thumbnail and breakpoints
- Upload plugin: "sizeOptimization" parameter in the config of plugin doesn't correctly apply to thumbnails and breakpoints.
- Brand new v5 install, error on first startup - Error: Cannot find module '@strapi\plugin-content-manager\package.json' HOT 3
- nx run @strapi/plugin-i18n:build HOT 1
- nx run @strapi/plugin-i18n:build error HOT 2
- bulk publish only works for the first selected item
- Error on installation...
- Developing locally pointing to production database dropped data HOT 3
- Snip HOT 3
- in Uid field the available option is on top of the field value when we have a large uid value HOT 1
- Strapi transfer does not work with aws waf standard rules HOT 2
- [Strapi 5 Beta] Maximum call stack size exceeded error when using a self-referencing relationship HOT 8
- Unable to Publish Single Type in Non-Default Locale if It's Not Created in Default Locale HOT 2
- NOTICE: Formidable Vulnerability is NOT valid HOT 1
- RBAC not working for plugins
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from strapi.