GithubHelp home page GithubHelp logo

open-source-chandigarh / go-postgres-docker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from amanse/go-postgres-blog

0.0 1.0 1.0 276 KB

JavaScript 13.39% Go 80.38% HTML 3.98% Dockerfile 2.24%

go-postgres-docker's Introduction

go-postgresql-blog

Just a backend(for now) written in golang and using mariadb as database

setup

  • git clone
  • go mod tidy
  • start postgresql terminal
  • CREATE DATABASE go_blog;
  • USE go_blog;
  • CREATE TABLE posts (id SERIAL PRIMARY KEY, body text, email VARCHAR(255), user_id int);
  • CREATE TABLE users (id SERIAL PRIMARY KEY, email VARCHAR(255) UNIQUE, password VARCHAR(200));
  • exit
  • go to root directory
  • go run main.go

api routes

  • :9090/posts [GET] to get all posts
  • :9090/posts [POST] to make post
  • :9090/posts/{id} [PUT] to update post
  • :9090/posts/{id} [DELETE] to delete post

go-postgres-docker's People

Contributors

amanse avatar

Watchers

 avatar

Forkers

harshit0571

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.