Skip to content

audrey-yang/blog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blogging Software

Following the Build Your Own Blogging Software challenge.

How to run

  1. Spin up a PostgreSQL server and create a database.
  2. Create a table posts with the following command:
    CREATE TABLE posts (
        id SERIAL PRIMARY KEY,
        title VARCHAR(50) NOT NULL,
        summary VARCHAR(100) NOT NULL,
        body TEXT NOT NULL,
        created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
        updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
    );
    
  3. Save the database URL in an environment variable DATABASE_URL (something like "postgres://user:pass@localhost:5432/dbname").
  4. Run go run main.go and navigate to localhost:8090 to use the service.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published