Skip to content
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

New reloading development server #472

Merged
merged 9 commits into from
Nov 16, 2018
Merged

Conversation

aisola
Copy link
Contributor

@aisola aisola commented Nov 8, 2018

I was chatting with @josephmancuso and found several issues regarding the quality of waitress + our old code reloading system. We found that the development experience could be greatly improved by changing it out with this instead.

The improvements are:

  • No more waitress bugs, we now use a slightly modified wsgiref-based server for development. This won't matter to most people but it will matter if you use frameworks on the front end or if you accept a lot of files.
  • The code reloading is much faster. We're letting the operating system do its job now.

I've tested this on both Mac OSX and Ubuntu. I would appreciate if somebody could test this on Windows. It wouldn't hurt to have somebody confirm that it works on both Mac and Linux again too.

@aisola aisola self-assigned this Nov 8, 2018
@coveralls
Copy link

coveralls commented Nov 8, 2018

Coverage Status

Coverage decreased (-0.005%) to 90.046% when pulling f569219 on revamp-development-server into 04b63d5 on 2.0.

@josephmancuso josephmancuso self-assigned this Nov 9, 2018
])

# monitor the env file too
reloader.watch_files(['.env'])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line of code is never reached

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, their docs really messed that one up. I'll get this fixed.

@josephmancuso
Copy link
Member

Made a slight modification. There was an issue where a file not found was being thrown. Apparently i think the loader is local to the commands directory? prepending the cwd to the file did the trick.

screen shot 2018-11-13 at 11 12 20 pm

masonite/commands/ServeCommand.py Outdated Show resolved Hide resolved
@josephmancuso josephmancuso added the next minor Issue scheduled for the next minor release label Nov 14, 2018
@josephmancuso josephmancuso changed the base branch from 2.0 to master November 16, 2018 01:56
@josephmancuso josephmancuso changed the base branch from master to 2.0 November 16, 2018 01:56
@josephmancuso josephmancuso merged commit b09cb5d into 2.0 Nov 16, 2018
@josephmancuso josephmancuso deleted the revamp-development-server branch November 25, 2018 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
next minor Issue scheduled for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants