Backend environment variables
The backend reads all configuration from a.env file located at back/.env. Copy the provided example file to get started:
.env with your PostgreSQL connection details and a secure secret key.
Variable reference
Hostname of your PostgreSQL server. Use
localhost when running PostgreSQL on the same machine.PostgreSQL username that has access to the
gestor database. Defaults to postgres in the example file.Password for the PostgreSQL user specified in
USERDB.Name of the PostgreSQL database. Must be set to
gestor (or whatever name you gave when creating the database manually).Port PostgreSQL is listening on. The default PostgreSQL port is
5432.Secret key used to sign JWT tokens and as the pepper for Argon2 password hashing. Must be a long, random, unpredictable string in production.
Example .env file
back/.env
Database setup
1. Create the database
TaskFlow Pro uses a PostgreSQL database namedgestor. Create it manually using pgAdmin or the psql CLI before running migrations.
The database name must match the value you set for
DATABASEDB in your .env file. If you use a different name, update both.2. Run migrations
Migrations create all tables and relationships. Run them from theback/ directory after your .env is configured.
knex_migrations table, so re-running this command is safe — it only applies new migrations.
3. Seed the database
The seeder (back/seeds/01_seder_inicial.js) populates the database with three users, two sample projects, five tasks with varying statuses and priorities, and three comments.
| Name | Password | Role | |
|---|---|---|---|
| Admin User | [email protected] | Admin123! | Admin (role 3) |
| María García | [email protected] | Maria123! | Project Manager (role 2) |
| Carlos López | [email protected] | Carlos123! | Developer (role 1) |
Frontend configuration
The frontend does not use environment variables. All API requests are hardcoded to:3001 before starting the frontend dev server.