Comments (8)
@darron Thanks for willing to contribute, Which troubles are you having with Buffalo?
from golangflow.
@darron https://github.com/bscott/golangflow/blob/master/actions/home.go#L47 shows usage of the app host. You can also get the host from the request.
from golangflow.
In theory appending the host here https://github.com/bscott/golangflow/blob/master/actions/home.go#L63 should it.
from golangflow.
from golangflow.
@darron I'm curious as to how you're trying to print stuff out.
This worked for me:
c.Logger().Debugf("host: %s", App().Host)
time="2017-07-11T09:48:06-04:00" level=debug msg="host: http://127.0.0.1:3000" method=GET params="{}" path="/rss" request_id=98e632ee05-c05154116e
Also fmt.Printf
works for me too.
How are you trying to log stuff?
Also, I updated the code with the following:
Link: &feeds.Link{Href: fmt.Sprintf("%s/posts/%s", App().Host, p.ID)},
And it worked no problem.
<item>
<title>Post 2</title>
<link>http://127.0.0.1:3000/posts/c68c8f7c-fe30-48a1-a331-f4f7b33d7d8a</link>
<description>content for 2</description>
<author>DB Seed</author>
<pubDate>Tue, 11 Jul 2017 09:50:47 +0000</pubDate>
</item>
How are you trying to build the link?
from golangflow.
I was doing it pretty much the exact same way.
I thought that maybe there was some old/duplicate versions of software around - so I blew away all my old buffalo binaries, pulled this repo again and started from scratch:
export GOPATH="/Users/dfroese/go"
cd ~/go/src/github.com/bscott
[email protected]:bscott/golangflow.git
cd golangflow
go get -u -v github.com/gobuffalo/buffalo/buffalo
dep ensure
npm install
buffalo dev
This is the only change:
Link: &feeds.Link{Href: fmt.Sprintf("%s/posts/%s", App().Host, p.ID)},
Now it totally works like it should - no more missing /
in the <link>
.
Thanks for the tip about c.Logger()
- wasn't aware that was available.
I am not sure what happened there - but now it all seems to work.
Sorry for the false alarm / bug report - appreciate the help sorting it out.
from golangflow.
No worries. Not sure what the mismatch was, but glad you got it working. :)
from golangflow.
Fixed and merged. Thanks @darron
from golangflow.
Related Issues (20)
- New Post trigger post to Twitter HOT 1
- Enable GH link back to user profile HOT 1
- User GH links not working HOT 1
- Add tests for Heroku CI
- Add Colly for crawling curated links
- Buffalo creating db but not tables HOT 1
- Connecting to a Mysql db HOT 9
- Create Short links Analytics Page
- Add Analytics for /rss endpoint
- Add date sort on Homepage
- Add Logout button
- Replace Goo.gl short links with FDL
- Create Posts JSON endpoint for Mobile
- Please add Topics to repo
- Implement Search
- Support Multi-languages
- Add Twitter Auth with Modal Login Window
- Add Pagination HOT 1
- Fix RSS to render Markdown in feed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from golangflow.