Home > Web Front-end > JS Tutorial > body text

Running bolt.new Locally

Patricia Arquette
Release: 2024-11-21 04:04:11
Original
462 people have browsed it

What is bolt.new?

bolt.new is an open-source tool for creating web applications.

While there is also a web version, this article focuses on how to run it locally.

Environment Setup

This article will guide you through the steps to run it using WSL (Windows Subsystem for Linux).

Installing pnpm

First, let's install pnpm.

sudo apt update suto apt install nodejs npm
sudo npm -g install n
sudo n stable sudo apt purge nodejs npm
sudo apt autoremove
sudo apt update 
sudo apt upgrade
Copy after login

After restarting the terminal, check if pnpm has been installed successfully.

node --version
npm --version
Copy after login

Downloading bolt.new

Next, refer to bolt.new/CONTRIBUTING.md to download the environment from GitHub.

git clone https://github.com/stackblitz/bolt.new.git
Copy after login

Install the libraries on WSL.

cd bolt.new
pnpm install
Copy after login

Create a .env.local file under the bolt.new folder and specify the Anthropic API key in it.

ANTHROPIC_API_KEY=YOUR_API_KEY
Copy after login

Execution

Run the following command:

pnpm run dev
# or
pnpm run build
pnpm run start
Copy after login

After running the command, a message like the following will be displayed after a short while.

pnpm run dev
> bolt@ dev /mnt/c/Users/<your folder path>/bolt.new
> remix vite:dev

  ➜  Local:   http://localhost:5173/
  ➜  Network: use --host to expose
  ➜  press h + enter to show help
Copy after login

When you access the specified URL, the bolt.new application will be displayed.

Running bolt.new Locally

By providing your requirements, it will create an application for you.

Running bolt.new Locally

Next time, we will add and modify some features and provide explanations.

The above is the detailed content of Running bolt.new Locally. For more information, please follow other related articles on the PHP Chinese website!

source:dev.to
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template