Components
Steps
Guide users through sequential processes.
Basic steps
Use numbered headers within a steps container to create a step-by-step guide.
Step 1: Create your project
Start by creating a new directory and initializing the project:
mkdir my-project
cd my-project
npm init -y
Step 2: Install dependencies
Install the required packages:
npm install express dotenv
Step 3: Create the entry point
Create a file called index.js:
index.js
const express = require('express');
const app = express();
app.get('/', (req, res) => {
res.json({ message: 'Hello World' });
});
app.listen(3000, () => {
console.log('Server running on port 3000');
});
Step 4: Run the server
Start your application:
node index.js
Visit http://localhost:3000 to see the result.
Deployment steps
Step 1: Build for production
npm run build
Step 2: Run tests
npm test
Step 3: Deploy
npm run deploy
Your application is now live.