This tutorial shows how to set up a new Node.js project in Replit and get it running in the workspace.
Notes
- You need a Replit account to get started. Sign up at replit.com if you don't have one yet.
- Replit is phasing out Developer Frameworks. If replit.com/developer-frameworks is unavailable, go to your dashboard, click + Create Something New, and describe your project in the prompt - for example, "Create a Python project with Flask installed." The Agent will set up the environment automatically.
- Sign in to your account at replit.com and go to replit.com/developer-frameworks. Choose Node.js from the list.
- Click Remix. When the Privacy option prompts, choose the default (Public) and click Use Framework.
- Wait for Replit to set up the environment, then click the Open Files icon in the top-right corner and click File tree.
- Review the generated project structure - Replit creates an index.js and a package.json file by default. The package.json manages your project's dependencies and scripts.
- Click index.js to open it in the editor and start writing your server logic - for example, an API endpoint that returns a Q3 performance summary for a SaaS team.
- Click the Run button at the top of the workspace. Replit starts the Node.js server and displays the output in the Console panel on the right.
- To add a package, ask the Agent - for example, "Add Express to this project" - and it will install it and update your package.json automatically.
.gif)
