ullaakut / bloggo Goto Github PK
View Code? Open in Web Editor NEWThe blogging CMS for go doggos
License: Apache License 2.0
The blogging CMS for go doggos
License: Apache License 2.0
Authorization
header in the routes that require it![
{
"id": 3,
"author": "auth0|596f27c2c3709661e9cea37d",
"title": "Lorem ipsum",
"content": "Dolor sit amet",
"created_at": "2018-08-03T00:00:00+02:00"
},
{
"id": 4,
"author": "auth0|596f27c2c3709661e9cea37d",
"title": "Lorem ipsum 2",
"content": "Dolor sit amet",
"created_at": "2018-08-03T00:00:00+02:00"
},
{
"id": 5,
"author": "auth0|596f27c2c3709661e9cea37d",
"title": "Lorem ipsum 3",
"content": "Dolor sit amette",
"created_at": "2018-08-03T00:00:00+02:00"
},
{
"id": 6,
"title": "EDITED TITLE",
"content": "EDITED CONTENT",
"created_at": "2018-08-03T00:00:00+02:00"
}
]
It could be due to a configuration issue in gorm or MySQL. Need to investigate.
I just realized that currently, token signatures are not verified at all!
This means we need to store the secret somewhere to put it in the configuration. Normally I would password-protect it and ensure that a human inputs the credentials to decrypt it and deploy the stack, but to keep the testing of this project fast and easy, I will just get it from the environment and set it in the docker-compose.yml
file, but don't do this at home!
It could be neat to have a git hook that would make sure that all unit tests are passing before committing new code.
It could also run goimports or goreturns automatically on all of the code base.
I wasn't thorough enough when testing my code, and I didn't see that the author actually disappears when a post is updated.
Something like what I did for my personal website should be quick & easy:
<script>
$(function(){
$.ajax({
type: "GET",
headers: {
"Access-Control-Allow-Origin": "*",
},
url: "https://ommnvjncbj.execute-api.us-east-2.amazonaws.com/Unknown/posts"
})
.done(function(data) {
// console.log(data["body"])
var posts = jQuery.parseJSON(data["body"])
$.each(posts, function(k, v) {
console.log(v["id"])
console.log(v["title"])
console.log(v["firstPublishedAt"])
console.log(v["uniqueSlug"])
$("#articles .row").append(`
<article class="6u 12u$(xsmall) work-item">
<a href="https://medium.com/@brendanleglaunec/` + v["uniqueSlug"] + `" class="image fit">
<h3 class="medium-post">` + v["title"] + `</h3>
</a>
</article>`)
})
})
})
</script>
adminer
.sql
file mysql:
image: mysql
environment:
MYSQL_ROOT_PASSWORD: root
volumes:
- ./data/blog_posts.sql:/docker-entrypoint-initdb.d/01-blog_posts.sql
- ./data/users.sql:/docker-entrypoint-initdb.d/02-users.sql
tryWithDelay
function that takes that timer and a function to executeSee #10 for more information.
I started working on it after work today, and spent a few hours recycling a previous project of mine to build the structure of Bloggo. Also I found a name for the project, Bloggo, which sounds pretty cool.
I also started writing an API Blueprint but it's not the right time to do it yet, however it's a great reminder that I have to do it in the future.
Depends on issues #76 & #67 & #78
css
file using Javascriptcss
file using the backend route from #76Delete
methodDelete
methodDelete
methodAdd route to change the theme
Allow to upload css files and use them as the main css file used by Bloggo
Keep previous css files archived
Store css files info in database
Add theme repository (create, get, update, delete)
Add theme controller
This will make it way easier for Artur and John to test the API.
Delete
methodDelete
methodDelete
methodMake the difference between theme images, blog post images and avatars
Add route, repository and controller for uploading images
Support at least PNG and JPG
Support max size of 2mb
Add image upload controller
Add image upload repository
Keep image paths in the database
Logo should have a gopher and a doggo
Use OpenIDConnect
gelf
log driver and giving it the address of the local logstash instanceThis would help to make it obvious when a new feature is not unit tested, or a change reduces the test coverage. Thanks to coveralls, maintaining a high test coverage can be enforced.
go get github.com/mattn/goveralls
exp
claimsub
claimiss
claimI really should have set up an automated test coverage tool. Because of not including one, I completely forgot to double check my unit tests, and it turned out that they were no longer at 100%.
Also, I apparently missed a path in my unit tests for the access service, so this also needs to be fixed.
cd /usr/share/nginx
rm -rf html
git clone [email protected]:Ullaakut/Bloggo.git html
RetrieveAll
methodRealAll
methodRetrieveAll
methodThe logs seem normal, but in Postman we don't seem to receive the error message that is displayed in the logs.
I think it's due to the way resources not found are handled, I forgot to add .Error()
to give the string value to echo.NewHTTPError(httpCode, interface{})
, and I think passing an error in the interface{}
parameter just returns an empty object.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.