WIP/RFC: Added support for running on Replit.com #1995
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a work in progress / request for comment, and I don't expect this to be merged as is.
I wanted to explore a way to make it easier to contribute to the p5.js-web-editor project, and one what I thought that could be done would be to make it possible to run it and make changes on Replit.com
The nice thing about Replit.com is that anybody with a web browser-- even on a locked down chromebook, school computer, or tablet-- can edit and run server side code.
Here’s the P5.js web editor on Replit.com: https://replit.com/@KumuPaul/p5js-web-editor#developer_docs/replit.md
Potential Concerns
/preview
)..env
file.env
is inadvisable.env.replit
that contains non-secret environment settings and sourced it usingdotenv-cli
, then configured the things that were actually secret as Replit.com secrets.Outstanding Issues
Resources
Replit.com has strict resource utilization limits, and the way I have set it up this deployment is currently perilously close to the limits of a Boosted, Hacker Plan REPL (Hacker plans cost $7 per month on Replit.com and come with 5 boosts).
The limits on RAM and Storage are the issues. The RAM issue primarily stems from the fact that I am running MongoDB locally in the Repl. I think this could be mitigated by updating the instructions to have the contributor set up external MongoDB hosting. External MongoDB would also help mitigate the storage space issues, but the size of
node_modules
is a big part of that. So looking for ways to pare down the dependency tree might also be helpful.Documentation
I need to do some more work on the documentation for this environment.