- TypeScript
- Frontend
- React
- Redux
- Backend
- Express
- Database
- PostgreSQL
node-postgres
for connectionyesql
for named queries
- Docker-compose
- currently from database only
- Clone project
- Go to project root
- Install dependencies
npm install
- Set up database
- Start a container with postgres instance
docker-compose up -d
- Define schemas
psql "postgresql://todoapplicationdev:passwd@localhost:2345/tododbdev" --file src-database/ddl.sql
- Seed the database
psql "postgresql://todoapplicationdev:passwd@localhost:2345/tododbdev" --file src-database/seed.sql
- Test it works
psql "postgresql://todoapplicationdev:passwd@localhost:2345/tododbdev" -c "SELECT * FROM todoapp.task"
- Or run all psql-commands with a script:
bash init_and_seed_db.sh
- Start a container with postgres instance
- Run development server
npm start
- Open browser http://localhost:3000/