This is something we want to avoid doing at all cost. There would be so many edge cases to handle, we would be changing them constantly to catch a false positive or false negative. We have the same issue with testing CSS with regex.
The beauty of Glitch is that you can just start working more or less immediately - you click on the link we provide and off you go. As @jeremyfiel (apologies if I’ve got the wrong person!) said on Gitter it’s important for user to be able to focus on the relevant part - in this case the server code. That’s something that Glitch does well. Unfortunately it’s not terribly stable and seems to lose people’s work quite a bit.
With that in mind @Catalactics’s idea makes the most sense to me. Not necessarily repl.it, https://codesandbox.io/ is another possibility. Both seem like reasonable alternatives. They are a little more low-level than Glitch - for example, you have to choose to watch the code, that’s not automatic.
That said, as long as it’s a) possible to sync them with the boilerplate and b) easy to get started, I think they’re viable options.
I do agree with Jeremy on this, whilst also thinking it would be a good experience for users to do more of a set-up. Aside from setting environment variables, creating a database (already needed with Glitch), and forking the boilerplate from GitHub, I have been just refactoring the boilerplate to follow current best-practices, as well as allow simple development.
I have been trying CodeSandBox, but cannot seem to get Node ^12.0.0 up. @ojeytonwilliams, do you have any idea how to make CodeSandBox use a specified version of Node? I have read the docs, but requiring Node in the dependencies or devDeps does not seem to work - the default is always:
email@example.com: The engine "node"is incompatible with this module. Expected version “^12.0.0”. Got “10.20.1”
Here is the current boilerplate: https://codesandbox.io/s/github/Sky020/boilerplate-advancednode?file=/package.json
@Sky020 Here is a fork of your project.
I had to change the path to the custom Node version from what is shown in codesandbox own custom Node version example and I added a
/version route up top just to test.
That is exactly what I have been trying to do, but keep getting this:
I just realise, I need to remove the declaration of which engine to use…
I just want to add my experience of working with an alternative of Glitch. Sky already knows the background about me. I was struggling to complete the .env lesson of the Node and Express series and having trouble particularly getting FCC to validate my code at Glitch. Glitch is very slow and at the time of my writing this, is also status yellow for two of their service.
I tried Repl as suggested by Catalactics and it is amazing. Here are the steps I took :
- Go to Repl.it
- Choose ‘clone from github’ and gave the fcc repo link - https://github.com/freeCodeCamp/boilerplate-express
- It asks whether the language is nodejs and run command should be npm start. I just clicked on the confirmation button, nothing else.
Viola ! my API endpoint was working on creating the .env file and putting logic in the myApp.js and the best part is FCC validated it in a swift. No hickups.
I seriously think this should be considered as a new alternative to Glitch which is painfully slowly and doesnt play well with FCC validation.
Here is my repl link if you want to try it - https://repl.it/@pavansagar/boilerplate-express
Are you done with Repl.it? I’m getting trouble, repl link doesn’t work anymore.
It worked for me too.
Great! it works (for you)! But not for me
Here is a blog post from Glitch
Codesandbox has the githubbox URL that works like Glitch. You can prepend a Github repo with it and it will open a sandbox and start to import the repo. It seems to work pretty well.
But it is true that we would have to change the startup script to use nodemon which means the repo wouldn’t work well cross-platform with Glitch. nodemon does sort of, kind of, work on Glitch but it’s buggy because it is fighting with the build-in auto restart that Glitch has.
I made a Github repo with the starter code needed. Here is the githubbox link.
@ramonm_pacheco can you share your Repl.it source code?
@hpdipto That is the expected output. There is nothing being sent on the
/ route. You have to start putting in your code for each of the challenges.
Sorry, i thought i had shared the first time.
@ramonm_pacheco thanks for sharing
So, are we truly deciding which one we are shifting to? Or we’re going to stick with Glitch and see if their service came a little more reliable?
I’m pretty sure it will get better again, Glitch is working on it (see the blog post I linked to).
But it does bring up the point of how feasible it really is to host the projects on free services. We can’t really have any expectations or demands of free services, you get what you get.
I think it’s reasonable to expect campers to be able to use Git by the time they are working on back end challenges. Ideally, FCC would include a Git unit (or maybe links to the many tutorials that are out there). Having just said that, I am having difficulty getting my Git project to pass npm tests despite having read the issue and solution here.. Having looked briefly at repl.it and Code Sandbox, I had trouble with the latter (trying to fork some projects or my Git repo) but very little trouble getting started on the former. Just one opinion.
Just a quick reminder.
If you are going to share a working starter project please make a fork of it where you have removed all the solutions. Otherwise, you are just sharing full working solutions, which is something we do not want on the forum.
People need to pass the challenges themselves.
Thank you, and happy coding.