Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/irezaul/todo-go
A simply activity
https://github.com/irezaul/todo-go
gin golang gorm postgresql tmpl
Last synced: about 1 month ago
JSON representation
A simply activity
- Host: GitHub
- URL: https://github.com/irezaul/todo-go
- Owner: irezaul
- Created: 2022-07-25T13:53:54.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-07-27T17:37:15.000Z (over 2 years ago)
- Last Synced: 2024-06-21T03:13:15.682Z (6 months ago)
- Topics: gin, golang, gorm, postgresql, tmpl
- Language: Go
- Homepage:
- Size: 21.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# todo-go
A simply activity### Database
* Installing PostgreSQL
```bash
$ sudo apt updateThen, install the Postgres package along with a -contrib package that adds some additional utilities and functionality:
$ sudo apt install postgresql postgresql-contrib
```
* Ensure that the server is running using the systemctl start command:
```bash
sudo systemctl start postgresql.service
```
* Switch over to the postgres account on your server by typing:
```bash
sudo -i -u postgres
```
* You can now access the PostgreSQL prompt immediately by typing:
```bash
psql
```
* `Exit out` of the PostgreSQL prompt by typing:
```bash
\q
```
### Creating a New Database ( `use semicolon must` )
```bash
create database ;
```
* check database list
```bash
\list
```
* how to delete database ( `use semicolon must` )
```bash
drop database ;
```
* Create a new user with password ( `use semicolon must` )
``` bash
create user with password 'pass';
```