Coder Social home page Coder Social logo

gobuffalo / docs Goto Github PK

View Code? Open in Web Editor NEW
110.0 16.0 154.0 79.16 MB

The source for the Buffalo website

Home Page: https://gobuffalo.io

License: MIT License

Go 10.71% HTML 19.76% JavaScript 54.44% Makefile 0.13% SCSS 14.34% CSS 0.61% Dockerfile 0.02%
go buffalo golang gobuffalo documentation example hacktoberfest

docs's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docs's Issues

Running example goth on port 8080

I runned a second time the example from scratch using linkedin instead of github.
And same thing happen if I am not on 8080 it doesn t work.
mMany people can be blocked testing locally because of the port not beeing opened.
The default 3000 if not opened on your router (ex you are at the office), will block the authentication.
Therefore it could be worth noting on the blog to try to run it on 8080 like this :

PORT=8080 buffalo dev

Having trouble contributing

Hi Mark,

I just cloned the repo and run buffalo setup, everything ok except that the app is not loading any assets:

http://localhost:3000/assets/application.css => 404

Can you please help me so that I can contribute to the docs?

Thank You

Add WrapHandler to the main docs

Although they don't do a whole lot, it might be a good idea to call out the wrap functs found in https://github.com/gobuffalo/buffalo/blob/master/wrappers.go in the documentation somewhere.

In my previous experience with Go HTTP frameworks, using custom Handler interfaces has been a pain primarily because it is no longer easy to use existing middleware that implements http.Handler. I almost didn't find these provided wrappers. Having them in the docs might communicate that Buffalo will work happily with standard middleware, which I don't think is true of all frameworks.

Running tasks error on windows

Good day,
I used buffalo for an app, which works fine, but on windows, when i try running buffalo tasks db:seed it returns an error saying 'grifts' directory could not be found. I'm sure i am in the right directory, i even did buffalo task init and it places example.go inside the grifts directory, but running the seed task does not find the directory. Apart from this everything else works fine...

I'd really appreciate if you can help me identify what's wrong. THANKS...

Deploy section

Move Building / Binaries section to a new "Deploy" section. In this new section, we will add at least one chapter about how to deploy a Buffalo app; common setups like Buffalo behind NGINX / Apache proxy, or even init scripts.

Docker can have a specific chapter in this new section too.

Titles Overlaps Sidebar

This is a little style thing that was not happening before, but I think a screenshot says more than x words...

screen shot 2018-02-22 at 4 09 15 pm

Documentation / tutorial Scoping

The Scoping function in Buffalo needs a documentation.

Here is a draft / reminder (for me ):

Once you have been through the tutorial on how to set a login on your app using Goth or Password auth (
https://gobuffalo.io/docs/examples#using-goth-with-buffalo
https://gobuffalo.io/docs/examples#using-password-authentication-with-buffalo
)
chances are that you want to limit the access of certain resources to certain users.
For example you don t want everyone to be able to modify the profile of every one on your website!
You want each user to be able to change ONLY the parameter of its own profile.
This is done using scoping.
[to be continued ...]


Stanislas technical def :

The scope function returns a pop query builder. Its aim is to build queries with the same base.
So tx := c.Value("tx").(*pop.Connection) gets the current pop transaction.
Then cu, ok := c.Value("current_user").(*models.User) gets the current user from the context.
You can get it from there, because a middleware set it from the session attribute current_user_id.
For reference, this middleware is declared here https://github.com/gobuffalo/toodo/blob/master/actions/users.go#L43.
The cu, ok := c.Value("current_user").(*models.User) returns two values: one to get the current user if it was set (= the user is connected), and ok is set to true if the current user is a valid user.
If it's not ok, the scope function returns an empty query constructor using tx.Q().
It means there is no current user, so you can't filter it.

Otherwise, it'll return a new query constructor with a filter preset: tx.BelongsTo(cu) will create a base query with a WHERE user_id = current user id.
So for each query using this preset constructor (aka scope), it will add a WHERE user_id = current user id if there is a connected user.
Or default to the non-filtered query otherwise.

Add "Features at a glance" or "Comparison" page

The purpose of this page would be to give developers a way to evaluate if Buffalo is ready for them.

Having a "Features at a glance" would be a great start, but ultimately, showing a feature comparison of Buffalo to Rails would be better.

This isn't about showing which framework/ecosystem is better, but more about allowing a developer to make an informed decision on what tools they are going to be able to get when they choose Buffalo. It would also help identify any large technology gaps that still need to be added.

Licence file is missing

This repo doesn't have any licence. :)

  • Add a licence for the website / content.
  • Add the artworks assets (such as the logo) licence too (in the same file?).

Buffalo v0.10.3

This issue keeps track of changes in the Buffalo 0.10.3 version, to ensure they are documented before the release.

Buffalo:

  • Support Unix domain sockets to bind Buffalo
  • StrictSlash should be customizable
  • added easy support for file uploads
  • added a flag to generate apps with bootstrap 4
  • .env support

Document or Change Postgres binary dependency

First, thanks for the project, it looks very compelling. As I was trying to go through the tutorial, I ran into an issue with the DB Migration process. I had started my Postgres DB in a docker container (and did not have this Postgres driver itself natively installed on my machine) and received:

Error: couldn't create database footnotes-buffalo_development: error creating PostgreSQL database footnotes-buffalo_development: exec: "createdb": executable file not found in $PATH:

It turns out after installing Postgres client (and the related binaries) things "just worked".

Ideally there would be no need for the Postgres tool chain at all to be installed locally at all, but it would be handy I think to explicitly call this out.

I haven't had time to look into this further, but if this is also a requirement for any specific type of migrations, then it would make the case for native support in the tool even more compelling to remove the dependency for CI systems, containers, etc. to package that.

Documentation confusion

I'm starting out in go for the weekend, just testing it out but the docs seem a little grey. I'm not entirely sure how you get from this

$ go get -u github.com/gobuffalo/buffalo/buffalo

to this

$ cd $GOPATH/src/github.com/$USER/
$ # Make sure $GOPATH/bin is in your $PATH, then:
$ buffalo new

I created a brand new ubuntu 16 container, go 1.6 installed, tested with the BS hello stuff and it works fine. I run the go get command above, it thinks for a while, after a bit, I get a src folder. Yay. But there is no buffalo command in GOROOT, GOPATH or anywhere for that matter. Also, cd $GOPATH/src/github.com/$USER/ doesn't exist - How does $USER get created? The instructions don't tell me to do that, so?

I know go is working. So how does that $USER path get created? and where is buffalo supposed to get installed because it isn't in $GOROOT/bin find / -type f -name buffalo comes back null.

Space for content on the website is small

So while getting started with buffalo, I went to the documentation site to read the guides, while doing so I felt a bit uncomfortable with the sizing of the content view, and it might be a bug rather than a personal thing.

Running on Firefox 58.0.1 (64-bit) with a display of 14" at resolution of 1366x768 it renders as:

screenshot

Seems the "Buffalo - Rapid Web Development in Go" is taking too much space on the navbar, in such, when scrolled it does not collapse into a thin navbar. Removing the "Rapid Web Development in Go" does the job as seen:

screenshot

Also the footer could be there but not fixed, just at the bottom of each page saving more space.

Dev version documentation

As discussed on Slack, we should introduce a development branch. This branch will contain documentation about the next version of Buffalo, and will be merged into master on new Buffalo release.

We can propose a copy buffalo.io on a subdomain to publish the development version of this documentation, so early adopters can have an up to date reference to test changes.

Documentation Building : improving the step by step guide

The documentation is very helpful but may be improved for beginners.
It could be modified in this way:

Before building, you need to set your database configuration. By default your database.yml contain the following lines:
production:
url: {{envOr "DATABASE_URL" "postgres://postgresUSER:[email protected]:5432/MY-Database_production?sslmode=disable"}}

You need to complete the postgresUSER postgresPASS according to your server login on postegres.

[YOU BUILD your binary...]

Once your binary is downloaded on your server, you need to manually create your database "MY-Database_production" . Contrary to the dev mode (buffalo dev) the production binary ask you to create the Database by hand.

To do so login postgres and type something like "CREATE DATABASE MY-Database_production;"

MIGRATION
Once created launch your app on the command line with the option "migrate" as following
./MySuperAp migrate
The database tables will then be created.

[Launching your app in dev mode for a test run:

By default if you launch the app like this "./MySuperAp" it will be in development mode, looking for the dev database. Which you might want to run to check it is working in dev mode on your server... In this case you want to type in command line "export ADDR="MY-IP". Which will temporarily set the ADDR variable.
]
Once you are all set, you now want to, launch your app in service mode, by following the tutorial here : https://gobuffalo.io/docs/systemd

PS: after this we could also explain how to integrate buffalo with an existing apache or nginx server. Deploy-> integrating with existing web server

Add database creation to docs

Issue moved from gobuffalo/buffalo#833

This project is great and I can't wait to dive in further. Thanks for creating/maintaining it!

Getting started with buffalo has been relatively easy on one of my workstations but getting the database up was easily the part that had me opening a slew of tabs to google around. Where's a known good docker container that can run postgres/sqlite3/mysql? How to run the container such that it runs on the correct port, or is accessible by name, or creates a database file we can use straight away? It didn't take super long to resolve but it wasn't trivial for someone even having experience with these technologies.

Pop & Plush should have their own space

Pop and Plush are big components in Buffalo ecosystem, and they have their own pace. They should have their own namespace or subdomain and a dedicated documentation.

Buffalo documentation should refer to these docs, and only explain how to use Plush and Pop in Buffalo context.

Suggestion

Thinking of adding two sections:

  1. Screencasts
  2. Sites made with Buffalo

Thoughts?

I can't install it locally

First of all, thanks for the buffalo project and the hard work to make everything easier.

My Go environment is:

  • go version go1.7.4 linux/amd64
  • glide version 0.13.0-dev

I am trying to install the web locally but I have a problem with glide. When I run glide install, I get:
[WARN] Lock file may be out of date. Hash check of YAML failed. You may need to run 'update'
but it seems to install successfully the dependencies. When I try to build it, I get:

# github.com/gobuffalo/gobuffalo/actions
actions/render.go:23: unknown render.Options field 'FileResolverFunc' in struct literal

Now, if I run: glide update, as recommended in the warning, I get another error:

[ERROR]	Failed to set version on github.com/gobuffalo/buffalo to 6a260cd30f2c6e2083be41af4ad43dd46d551074: Unable to update checked out version

The curious thing is that when I run the glide install the buffalo
version installed was: e4fadf1c6403eea0c9d2047adfb40ccdbbc7bcf4

Buffalo v0.10.2

This issue keeps track of changes in the Buffalo 0.10.2 version, to ensure they are documented before the release.

Buffalo:

  • Simplify i18n
  • Proposal: move github.com/gobuffalo/x/mail into Buffalo "Core" fixes #752
  • no longer need extensions for templates in actions or partials for HTML, JS, and Markdown
  • Provide a way to load custom inflection rules
  • Localized views
  • Running a single test

Plush:

  • Variadic functions support

Running examples: "buffalo setup"

In my experience, it seems that most examples need to have the following command ran after the "go get" :
buffalo setup
This command often ask then to install this package :
https://github.com/golang/dep
This procedure could be specified in the example section of the website or in the examples them-self.

If not run, the CPU usage of the app gets a 100% and the ressources are not loaded.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.