Skip to content

Commit 1c151a1

Browse files
Merge pull request #16 from netlify-templates/tb/update
updated README.md
2 parents 2a73654 + 09d2127 commit 1c151a1

File tree

3 files changed

+38
-5
lines changed

3 files changed

+38
-5
lines changed

.env.example

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ VITE_CONVEX_URL=your-convex-deployment-url-here
66

77
# Sentry configuration
88
VITE_SENTRY_DSN=your-sentry-dsn-here
9-
SENTRY_AUTH_TOKEN=your-sentry-auth-token-here
9+
SENTRY_AUTH_TOKEN=your-sentry-auth-token-here
10+
11+
#Important! Never commit your `.env` file to version control as it contains sensitive information.

README.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,14 @@ A modern chat template built with TanStack Router and Claude AI integration feat
1818
- [Prerequisites](#prerequisites)
1919
- [Getting Started](#getting-started)
2020
- [Local Setup](#local-setup)
21+
- [Local Setup with Netlify Dev](#local-setup-with-netlify-dev)
2122
- [Troubleshooting](#troubleshooting)
2223
- [Building For Production](#building-for-production)
2324
- [Styling](#styling)
2425
- [Error Monitoring](#error-monitoring)
2526
- [Environment Configuration](#environment-configuration)
2627
- [Anthropic API Key](#anthropic-api-key)
27-
- [Convex Configuration](#convex-configuration-optional)
28+
- [Convex Configuration (Optional)](#convex-configuration-optional)
2829
- [Routing](#routing)
2930
- [Adding A Route](#adding-a-route)
3031
- [Adding Links](#adding-links)
@@ -142,6 +143,34 @@ Follow these steps to set up and run the project locally:
142143

143144
The application should now be running at [http://localhost:3000](http://localhost:3000)
144145

146+
### Local Setup with Netlify Dev (Recommended)
147+
148+
You can also use [Netlify Dev](https://www.netlify.com/products/dev/) to run your application locally with Netlify's full functionality:
149+
150+
1. **Install Netlify CLI globally** (if you haven't already)
151+
```bash
152+
npm install -g netlify-cli
153+
```
154+
155+
2. **Link your Netlify site** (optional)
156+
```bash
157+
netlify link
158+
```
159+
This will connect your local project to a Netlify site. If you haven't created a Netlify site yet, you can skip this step.
160+
161+
3. **Start the development server with Netlify Dev**
162+
```bash
163+
netlify dev
164+
```
165+
This will:
166+
- Start your local development server (similar to `npm run dev`)
167+
- Load your Netlify environment variables
168+
- Provide local versions of Netlify Functions (if any)
169+
- Simulate the Netlify production environment locally
170+
171+
4. **Access your site**
172+
The application will be available at [http://localhost:8888](http://localhost:8888) by default.
173+
145174
### Troubleshooting
146175

147176
- **Node.js version**: Ensure you're using Node.js v20.9 or higher. You can check your version with `node -v`.
@@ -197,6 +226,8 @@ If the Sentry environment variables are not defined, the application will run wi
197226

198227
## Environment Configuration
199228

229+
**Important**: Never commit your `.env` file to version control as it contains sensitive information. The `.env` file is already included in the project's `.gitignore` file to prevent accidental commits.
230+
200231
### Anthropic API Key
201232

202233
You can generate and manage your Anthropic API keys through the [Anthropic Console](https://console.anthropic.com/login).

src/routes/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,9 +259,9 @@ function Home() {
259259
{/* Main Content */}
260260
<div className="flex flex-col flex-1">
261261
{!isAnthropicKeyDefined && (
262-
<div className="w-full max-w-3xl px-2 py-2 mx-auto mt-4 mb-2 font-medium text-center text-white bg-orange-500 rounded-md">
263-
<p>This app requires an Anthropic API key to work properly.</p>
264-
<p>Update your <code>.env</code> file or get a <a href='https://console.anthropic.com/settings/keys' className='underline'>new Anthropic key</a>.</p>
262+
<div className="w-full max-w-3xl px-2 py-2 mx-auto mt-4 mb-2 font-medium text-center text-white bg-orange-500 rounded-md text-sm">
263+
<p>This app requires an Anthropic API key to work properly. Update your <code>.env</code> file or get a <a href='https://console.anthropic.com/settings/keys' className='underline'>new Anthropic key</a>.</p>
264+
<p>For local development, use <a href='https://www.netlify.com/products/dev/' className='underline'>netlify dev</a> to automatically load environment variables.</p>
265265
</div>
266266
)}
267267
{error && (

0 commit comments

Comments
 (0)