omarkhatibco / adonis-nextjs Goto Github PK
View Code? Open in Web Editor NEWA provider to initialize nextjs app with adonis.
License: MIT License
A provider to initialize nextjs app with adonis.
License: MIT License
Hey!
There is any reason for this?
Why not keep the "resources" folder?
I'm sorry for opening the third issue about rebuilds. If I run a CLI command like adonis route:list
, I'm getting rebuilds and the output of the adonis command is gone because the console seems to refresh after next has finished the compilation.
Is there anything we can do inside the provider to prevent this or is there a better way than to comment out my next_routes.js
and the provider inside the app.js
file?
It would be very cool if the next object were passed to the controller.
An example is worth a thousand words:
Instead of...
const Next = use('Adonis/Addons/Next');
Route.get('/b', ({ request, response }) => {
const query = request.get();
return Next.render(request.request, response.response, '/b', query);
});
This
Route.get('/b', ({ request, response, next }) => {
const query = request.get();
return next.render(request.request, response.response, '/b', query);
});
I will try to do it by my self and send you a pull request, but I have never done this before.
Hey, thank you for the provider. It is my first time using Next.js and after seeing the addon I thought I no longer have an excuse to not use it for some performance critical routes.
When I run nodemon --inspect server.js, it goes into a loop of rebuilding the project every few seconds. How can I prevent this behavior?
I serve some Next.js routes in a larger adonis app. When I run my REST tests that contain the Client trait, Next.js rebuilds at the very beginning. This results in my tests running longer. Is there a way to prevent the rebuilds since those tests are not targeting any next.js related logic/pages?
Hi,
First of all great work on this package. Although it was a little complicated to get started.
The reason: Constant rebuilding when using adonis serve --dev.
The cause: Adonis serve --dev uses nodemon and ignores following patterns by default:
[
'/tmp/*',
'/resources/*',
'/public/*'
]
It doesn't ignore the next/* pattern
Workarounds:
Possible solution might be to put this in the documentation or moving the default next folder to something like /resources/next.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.