https://github.com/michellen/todo-golang-example
https://github.com/michellen/todo-golang-example
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/michellen/todo-golang-example
- Owner: michelleN
- License: mit
- Created: 2017-09-28T14:04:04.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-09-28T14:06:27.000Z (over 7 years ago)
- Last Synced: 2025-02-01T14:14:29.711Z (4 months ago)
- Language: CSS
- Size: 211 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# example-golang-todo
Simple Todo List web app.
**The backend is written in Go using the Standard
Library, only**.The frontend was copy and pasted from the TodoMVC project (backbone).
Pull requests are welcomed and **encouraged**!
## Getting started
Steps for getting up and running,
1. Install go
See https://golang.org/doc/install
2. Clone the repo
```
git clone https://github.com/michelleN/todo-golang-example.git
```3. Install project dependencies
```
cd todo-golang-example
go get
```4. Setup a database
The project expects a MySQL sever to be accessible via,
```sh
host = localhost
username = root
password = (EMPTY)
```Create a database called `golang_todo_dev`,
```sql
create database golang_todo_dev;
```Create a table called `Todo`,
```sql
CREATE TABLE `Todo` (
`Id` int(11) NOT NULL AUTO_INCREMENT,
`Title` varchar(255) DEFAULT NULL,
`Category` varchar(255) DEFAULT NULL,
`State` varchar(255) DEFAULT NULL,
PRIMARY KEY (`Id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
```5. Run the web app
```sh
go run server.go
```Visit [localhost:3000](localhost:3000)