GithubHelp home page GithubHelp logo

adonis-nextjs's Introduction

Hi there ๐Ÿ‘‹

adonis-nextjs's People

Contributors

omarkhatibco avatar thejltres avatar vincentducorps avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

adonis-nextjs's Issues

Prevent rebuild when running adonis CLI operations

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?

Next extends controller

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.

How can I prevent constant rebuilds when running the adonis server with nodemon

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?

Prevent rebuild while testing

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?

constant rebuilds when using 'adonis serve --dev'

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:

  1. running adonis serve --dev -i 'next/*'
  2. changing NEXT_FOLDER to 'resources/next'
  3. run npm run dev but then the adonis code isn't going to reload when making changes.

Possible solution might be to put this in the documentation or moving the default next folder to something like /resources/next.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.