Giter Club home page Giter Club logo

fullstack-todo's Introduction

What is this repository about?

This repository contains a basic template for a PERN-stack (PostgreSQL, Express, React and Node) based fullstack webapp. The content is closely following the

Webapp

Requirements for the application

Database setup

You need to install PostgreSQL and remember the path. I will refer to this path as POSTGRESQL_PATH (e.g. C:\Program Files\PostgreSQL\14). After installation make sure to add POSTGRESQL_PATH\bin to your path variable (e.g. C:\Program Files\PostgreSQL\14\bin). This will allow you to run the psql command from your terminal.

The PostgreSQL installation will create a postgres user by default. This is what I used for my implementation.

psql -U postgres

Entering the password should lead in an active connection. If you type \l you should see a list of all database. To create a new database newDatabase you can type CREATE DATABASE newDatabase;. Then connect to the database with \c newDatabase. After connecting to the database copy and paste the following content into the terminal

CREATE TABLE todo (
    id SERIAL PRIMARY KEY,
    description VARCHAR(255)
);

After setting the database up open the db.js inside the server folder and adapt the JSON object which is passed into the Pool constructor.

Install node modules

Open the terminal and browse into the server folder and type npm install to install all necessary node modules for the server. After the installation type npm install -g nodemon into the terminal to install nodemon. This packages will change the server as soon as a code file is changed by saving changes. If you type nodemon index your server will fire up. The server will run under port 5000.

Open the terminal and browse into the client folder and type npm install to install all necessary node modules for the React frontend. After the installation is complete you can type npm start to start the frontend application. You can view the frontend by opening a browser and by navigating to http://localhost:3000/.

fullstack-todo's People

Contributors

jalalmirzayev avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.