VirtualFS is a web application with a Golang backend and a React frontend to emulate a file system using a database (PostgreSQL).
You'll need the following: yarn
, Node.js
, go
, and postgresql
installed.
To build the project:
$ make build
Then create a database in PostgreSQL and provide these environment variables (values given here are the defaults):
Either:
DATABASE_URL=''
: the URL used to locate the database of the formpostgresql://user:password@host:port/database_name
Or all of the following:
DB_USER='postgres'
: User used to login to PSQLDB_PASSWORD='postgres'
: Password of above userDB_HOST='localhost'
: Hostname of the databaseDB_PORT=5432
: Port to connect to database toDB_NAME='virtualfs_test'
: Name of the database
Run the server and frontend with:
$ make run
Or:
$ make build && server/bin/server
Then the server can be accessed at localhost:8080
, and the backend API is at localhost:8080/api
.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.