Redis URL shortner in Go hosted on heroku

Hope you have read my previous article on testing redis on heroku & App engine .




Features Included:

1. Used online redis provided by redislabs

2. Proper folder structure ( I believe so)

3. Shows notifications in go

4. Added support for clipboard.js

I hope you have covered the basics of golang. Infact this youtube channel is highly recommended.

Get Started:

Directory structure: I wanted to in-cooperate MVC architecture. I didn’t use Go Web Frameworks as i wanted to learn the in and outs of the project. I hope this project structure is correct. ( Correct me if I am wrong)

The app has got 3 pages, namely – app, about, 404

MVC can be identified as

Model :- They are kind of data structures that deal with the database. It includes the db functions.

View :- They are those UI elements that are shown on screen.

Controllers :- They are related the functions specific to a page.

Pretty much similar to Ionic right ?

Public :- It is where you place all the public files accessible to viewers.


We can template common layout attributes and include them in every page.





2. public / js / main.js

3. Server.go

4. models / redis_db.go

5. controllers / app.go

I hope i explained something valuable with this tutorial. If i am wrong, do correct me.

To deploy this app on heroku or app engine, follow my previous article.

Happy coding.