Skip to content

CyaceQuious/bjsh98db-frontend

Repository files navigation

大体协数据库 - 前端

本前端修改自 Next.js 小作业

安装环境

按照小作业手册的指导,安装完成node.js与pnpm。

举例来说,WSL2可以这样操作:

mkdir ~/workspace && cd ~/workspace
wget https://nodejs.org/dist/v22.14.0/node-v22.14.0-linux-x64.tar.xz
tar -xf node-v22.14.0-linux-x64.tar.xz
cd node-v22.14.0-linux-x64/bin
pwd

请将这个输出的路径添加到环境变量中。为了方便,你可以在 ~/.bashrc 最后加上这句话:

export PATH=~/workspace/node-v22.14.0-linux-x64/bin:$PATH

随后回到你的终端,运行:

source ~/.bashrc

以重载配置。 至此我们安装好了 node.js ,可以终端输入指令 node -v 确认。

接下来,我们启用包管理器,下载项目,安装依赖:

corepack enable # 启用包管理器的管理器 corepack
git clone <OUR_PROJECT>
cd <PATH_TO_OUR_PROJECT>
pnpm install # 安装项目依赖

运行前端服务器

直接在项目文件夹里运行:

pnpm dev

接下来你可以在 http://localhost:3000/ 看到前端页面

OLD README

This is a Next.js project bootstrapped with create-next-app.

Getting Started

First, run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying pages/index.tsx. The page auto-updates as you edit the file.

API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.ts.

The pages/api directory is mapped to /api/*. Files in this directory are treated as API routes instead of React pages.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.

About

小马杯开盒器++ 前端

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •