An open API service indexing awesome lists of open source software.

https://github.com/dyxj/webapp-example

An example of a basic CRUD written with Go and Angular2/4 using MongoDB
https://github.com/dyxj/webapp-example

angular angular2 angular4 go golang mongodb

Last synced: 12 days ago
JSON representation

An example of a basic CRUD written with Go and Angular2/4 using MongoDB

Awesome Lists containing this project

README

        

# webapp-example
An example of a basic CRUD web application written with **Go** and **Angular2/4** using **MongoDB**.

Saw some questions on building a web application with **Go** and **Angular2/4** but couldn't find an example online, so I wrote one. Written to help people new to **Go**.
Looking to get critique. =)

## Prerequisites ##
* Go
* mongodb

## Documentation ##
To run the web application :
* Start up mongodb:- mongod
* go run main.go
* connects to default mongodb port
* check db/db.go for futher details

**main.go**
Entry point of web app. Initializes and run web application (app.go).

**app/app.go**
Application base, has functions required initialize and run web application.

**db/db.go**
Functions for database call.

**apis/api.go**
Base for api's, contains general api functions that are meant to be used by other api's.

**apis/item.go**
CRUD api's related to *items* and function to specify routes.

**models/items/items.go**
MongoDB queries for *items*.

**dist/\***
Contains compiled Angular2/4 frontend.

**AngularItemComponent**
Contains Angular components and service related to items.

## Web App Image ##
![Alt text](/webapp-example.png?at=master&fileviewer=file-view-default)