[NFBCS] node.js question
Paul York
paul at yorkfamily.com
Mon Jul 8 17:13:06 UTC 2024
It's been a year for me since I've played with this, but I'll try to help.
Using Codespaces means that it runs the node processes remotely "in the
cloud". There's no way for that remote process to open a browser on your PC.
All Codespaces does is to clone a GitHub repository and run an instance of
Visual Studio Code (vscode) in that folder. It just does it all remotely.
You can do this locally, entirely on your own PC if you like. Running `npm
start` or `npm run start` on your local PC will automatically launch your
browser.
- Install vscode (if you're running windows, just run "winget install
vscode" from the terminal)
- Install nodejs (in windows terminal type "winget install nodejs")
- Optionally install git (I think you already have)
At this point you now basically have your development environment. Note
that if you're using a mac, you can do similar installs from the terminal
if you first install "homebrew", but I won't go into details here.
>From the terminal you can create a directory to host your projects.
Terminal opens in your home directory, so perhaps just add a "projects"
directory here by typing "mkdir projects" in the terminal. Then navigate
into that directory with "cd projects".
>From there you can "git clone" a project into a subdirectory (perhaps using
the same repos you created in your training courses). Or run "npm
create-react-app" to create a blank app in a subdirectory. Then "cd" into
that subdirectory.
>From the project directory you can run "code ." (the period at the end
there says use the CURRENT directory) to open visual studio code in the
project directory. And at this point your experience should be nearly
identical to what you learned in your course. Except that when you run "npm
start", it should run the project on your personal PC and launch your
browser automatically.
Side note, unlike Codespaces, VSCode doesn't show the terminal by default.
You can toggle this visible using the Ctrl+~ (control+tilde) shortcut.
Tilde is the key to the left of the 1 key.
On Mon, Jul 8, 2024 at 6:15 AM marvin hunkin via NFBCS <nfbcs at nfbnet.org>
wrote:
> Hi. Have done three linked in learning courses, one for react with github
> code spaces. Two with vue and vue aunthetication. Now wondering have to
> then navigate to each project folder in terminal. Then do a server run and
> then build. Wondering if theres a web pack tool. When I then run the
> server, then builds the web pack but does not load in my browser, then have
> to then do a jaws virtual viewer and then copy the url. And then paste the
> url in chrome. Which is a few extra steps for each projects. Got about 30
> projects that I then learned. Similar or more for the vue projects.
>
> So is there a web tool that will then load the url from the node js
> command prompt to mybrowser.
>
> Marvin..
>
>
> _______________________________________________
> NFBCS mailing list
> NFBCS at nfbnet.org
> http://nfbnet.org/mailman/listinfo/nfbcs_nfbnet.org
> To unsubscribe, change your list options or get your account info for
> NFBCS:
> http://nfbnet.org/mailman/options/nfbcs_nfbnet.org/paul%40yorkfamily.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nfbnet.org/pipermail/nfbcs_nfbnet.org/attachments/20240708/9f0ec406/attachment.htm>
More information about the NFBCS
mailing list