Skip to content

Commit

Permalink
Improve README a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
roblillack committed Mar 23, 2021
1 parent c16eb73 commit b717104
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 13 deletions.
28 changes: 27 additions & 1 deletion README.md
Expand Up @@ -17,7 +17,33 @@ Mars is a fork of the fantastic, yet not-that-idiomatic-and-pretty-much-abandone

## Quick Start

Hah. Sorry, nothing here, yet. But if you want to switch a Revel project to Mars--see below.
Getting started with Mars is as easy as:

1. Adding the package to your project

```sh
$ go get github.com/roblillack/mars
```

2. Creating an empty routes file in `conf/routes`

```sh
$ mkdir conf; echo > conf/routes
```

3. Running the server as part of your main package

```go
package main

import "github.com/roblillack/mars"

func main() {
mars.Run()
}
```

This essentially sets up an insecure server as part of your application that listens to HTTP (only) and responds to all requests with a 404. To learn where to go from here, please see the [Mars tutorial](http://mars.readthedocs.io/en/latest/getting-started/)

## Differences to Revel

Expand Down
21 changes: 9 additions & 12 deletions docs/getting-started.md
Expand Up @@ -5,26 +5,23 @@
There is _no_ fixed directory hierarchy with Mars, but a projects' structure typically looks like this:

```
- $GOPATH/src/myProject (Your project)
- myProject (Your project)
|
|-- main.go (Your main go code can live here)
|-- main.go (Your main go code might live here, but can also be in ./cmd/something)
|
|-- conf (Directory with configuration files which are needed at runtime)
| |
| |-- app.conf (main configuration file)
| |
| |-- routes (Configuration of the routes)
| +-- routes (Configuration of the routes)
|
|-- views (All the view templates are here)
| |
| |-- hotel (main configuration file)
| |-- hotel (view templates for the “Hotel” controller)
| |
| |-- routes (Configuration of the routes)
| +-- other (view templates for the “Other” controller)
|
|-- mySubpackage (Your code is in arbitrary sub packages)
| |
| |-- foo.go
|
|-- vendor (Your vendored dependencies are here)
|-- ...
```
+-- mySubpackage (Your code is in arbitrary sub packages)
|
+-- foo.go
```

0 comments on commit b717104

Please sign in to comment.