juhapekkaeloranta / project-skeleton-react-node-ts-postgres

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Project-skeleton

Tech

  • TypeScript
  • Frontend
    • React
    • Redux
  • Backend
    • Express
  • Database
    • PostgreSQL
    • node-postgres for connection
    • yesql for named queries
  • Docker-compose
    • currently from database only

Installation

  • 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
  • Run development server npm start
  • Open browser http://localhost:3000/

Licence

License: GPL v3

About

License:GNU General Public License v3.0


Languages

Language:TypeScript 86.3%Language:HTML 7.5%Language:CSS 3.5%Language:Shell 2.0%Language:JavaScript 0.7%