- Node.js and npm installed
- PostgreSQL installed
- SeaweedFS binaries downloaded
- Git installed
- Clone the repository:
git clone [repository-url]
- Set up the backend:
cd seaweedfs/back
npm install
- Create a PostgreSQL database:
CREATE DATABASE seaweedfs;
- Configure environment variables:
- Create a
.env
file in theback
directory - Add your PostgreSQL connection string:
DATABASE_URL="postgresql://username:password@localhost:5432/seaweedfs"
- Initialize the database:
npx prisma migrate dev --name init
- Create a directory for SeaweedFS data:
mkdir -p tmp/data1
- Start the SeaweedFS master server:
./weed master
- Start the SeaweedFS volume server:
./weed volume -dir="tmp/data1" -max=1 -mserver="localhost:9333" -port=8081
Start the backend server:
npm start
The server should now be running and ready to accept connections!
- Make sure all required ports are available (9333 for master server, 8081 for volume server)
- Verify that the PostgreSQL service is running
- Ensure all environment variables are properly set
- Check that the tmp/data1 directory has proper read/write permissions
You're all set up! Feel free to enhance and customize the project as you like. I’ve provided the basic setup—now it's your turn to take it further! 😊