This is a test post to demonstrate code syntax highlighting with Prism.js.
Here's a simple React component:
import React, { useState } from 'react';
function Counter() {
const [count, setCount] = useState(0);
return (
<div>
<h1>Count: {count}</h1>
<button onClick={() => setCount(count + 1)}>
Increment
</button>
</div>
);
}
export default Counter;
A typed version with interfaces:
interface User {
id: string;
name: string;
email: string;
}
async function fetchUser(id: string): Promise<User> {
const response = await fetch(`/api/users/${id}`);
const data = await response.json();
return data;
}
A simple Flask API endpoint:
from flask import Flask, jsonify
app = Flask(__name__)
@app.route('/api/hello')
def hello():
return jsonify({
'message': 'Hello World!',
'status': 'success'
})
if __name__ == '__main__':
app.run(debug=True)
Database query:
SELECT u.id, u.name, COUNT(p.id) as post_count
FROM users u
LEFT JOIN posts p ON u.id = p.user_id
WHERE u.active = true
GROUP BY u.id, u.name
ORDER BY post_count DESC
LIMIT 10;
API response:
{
"status": "success",
"data": {
"user": {
"id": "123",
"name": "John Doe",
"email": "john@example.com"
}
},
"timestamp": "2025-12-15T10:30:00Z"
}
Deployment script:
#!/bin/bash
echo "Starting deployment..."
npm install
npm run build
if [ $? -eq 0 ]; then
echo "Build successful!"
pm2 restart app
else
echo "Build failed!"
exit 1
fi
Styling example:
.button {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 12px 24px;
border-radius: 8px;
border: none;
cursor: pointer;
transition: transform 0.2s;
}
.button:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
You can also use inline code like const greeting = "Hello World" within text.
This demonstrates that our code syntax highlighting is working across multiple programming languages!
Join SaaSBuilderPro and get access to the complete roadmap, AI builders, and launch templates.
See Plans & Join