Skip to content

unknown8121/seaweedfs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

SeaWeedFS filesystem

Prerequisites

  • Node.js and npm installed
  • PostgreSQL installed
  • SeaweedFS binaries downloaded
  • Git installed

Project Setup

  1. Clone the repository:
git clone [repository-url]
  1. Set up the backend:
cd seaweedfs/back
npm install

Database Configuration

  1. Create a PostgreSQL database:
CREATE DATABASE seaweedfs;
  1. Configure environment variables:
  • Create a .env file in the back directory
  • Add your PostgreSQL connection string:
DATABASE_URL="postgresql://username:password@localhost:5432/seaweedfs"
  1. Initialize the database:
npx prisma migrate dev --name init

SeaweedFS Setup

  1. Create a directory for SeaweedFS data:
mkdir -p tmp/data1
  1. Start the SeaweedFS master server:
./weed master
  1. Start the SeaweedFS volume server:
./weed volume -dir="tmp/data1" -max=1 -mserver="localhost:9333" -port=8081

Running the Application

Start the backend server:

npm start

The server should now be running and ready to accept connections!

Troubleshooting

  • 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! 😊

Authors

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published