Welcome! In this handsâon lab youâll install Node LTS, scaffold a React project with Vite, and ship a small interactive page â all in pure JavaScript (no TypeScript).
Node.js is a fast, eventâdriven runtime that lets you run JavaScript outside the browser.
Itâs built on Googleâs V8 engine, includes a rich standard library, and ships with npm
so you can pull in thousands of openâsource packages. In this lab Node supplies the CLI tools
(npm create, npm run) that scaffold, build, and serve your React project.
Vite (French for âquickâ) is a modern build tool that pairs an ultraâlight dev server (powered by native ES modules) with an opinionated Rollup build pipeline. Compared to the legacy Create React App, Vite starts in ââŻ50âŻms, hotâreloads instantly, and produces smaller, treeâshaken production bundles â all with zero config for most apps.
- Install the current Node.js LTS release on macOSâŻ&âŻWindows
- Use
npm create vite@latestto spin up a React app (JS template) - Run the dev server, hotâreload edits, and build for production
- Understand the project layout Vite generates
- Submit your finished repo to GitHub
| Tool | Min Version | How to check |
|---|---|---|
| Node.js | Â 18Â LTS (22Â preferred) | node -v |
| npm    |  9         | npm -v |
| Git    | any        | git --version |
Tip (macOS): Use HomebrewÂ
brew install node
Tip (Windows): Run the Node .msi installer ornvm-windows.
-
Create the project
# oneâliner: download & scaffold npm create vite@latest // name your app my-react-vite // follow instructions choose react with javascript cd my-react-vite
Select JavaScript when prompted.
-
Install deps & start dev server
npm install npm run dev # opens http://localhost:5173 -
Open the project in VSÂ Code (or your editor of choice).
| File / Dir | Why it matters |
|---|---|
index.html |
Entrypoint Vite injects your script into |
src/main.jsx |
Bootstraps React and mounts to #root |
src/App.jsx |
Start editing here â hot reload FTW |
vite.config.js |
Minimal config; tweak only if needed |
| # | Task | File |
|---|---|---|
| Â 1 | Replace the default Vite logo with an emoji or image of your choice | App.jsx & /public |
| Â 2 | Style the app (CSSÂ modules or plain CSS) so it looks yours | your choice |
| Â 3 | Stretch: Fetch a random cat fact from https://catfact.ninja/fact and display it |
new file / component |
npm run build # outputs optimized files to /dist
npm run preview # static server to verify prod build- App runs locally with
npm run dev - All required tasks complete
- Code pushed to a forked GitHub repo & make a pull request to public GitHub repo named
create-react-app-with-vite -
README.md(this file) lives at project root - Repo has at least one commit per task with descriptive messages
- Optional: Production build deployed on Netlify / Vercel (paste URL in GitHub repo description)
When youâre done, paste the GitHub URL into the LMS assignment portal.
- Node downloads â https://nodejs.org/en/download
- Vite guide â https://vitejs.dev/guide/
- React docs â https://react.dev/learn
Happy coding!