mirror of https://github.com/status-im/fathom.git
MIT license it is. Add readme instructions for getting a dev version running
This commit is contained in:
parent
f304b082a5
commit
7d7121cf14
21
LICENSE
21
LICENSE
|
@ -0,0 +1,21 @@
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2016 Danny van Kooten
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
20
README.md
20
README.md
|
@ -1,11 +1,23 @@
|
||||||
Ana. Open Source Web Analytics.
|
Ana. Open Source Web Analytics.
|
||||||
==============================
|
==============================
|
||||||
|
|
||||||
This is nowhere near being usable, let alone stable. Treat as a proof of concept.
|
This is nowhere near being usable, let alone stable. Please treat as a proof of concept while we work on getting this to a stable state.
|
||||||
|
|
||||||
![Screenshot of the Ana dashboard](https://github.com/dannyvankooten/ana/raw/master/assets/img/screenshot.png?v=6)
|
![Screenshot of the Ana dashboard](https://github.com/dannyvankooten/ana/raw/master/assets/img/screenshot.png?v=6)
|
||||||
|
|
||||||
## Usage
|
## Installation
|
||||||
|
|
||||||
|
For getting a development version of Ana up & running, please go through the following steps.
|
||||||
|
|
||||||
|
1. Rename `.env.example` to `.env` and set your database credentials.
|
||||||
|
2. Run the database migrations: `./do database_migrate up`
|
||||||
|
3. Install Go dependencies: `./do install_dependencies`
|
||||||
|
3. Compile into binary: `./do bin`
|
||||||
|
4. Create your user account: `./ana -create_user -email="johndoe@email.com" -password="...."`
|
||||||
|
5. Run default Gulp task to build static assets: `gulp`
|
||||||
|
6. Start the webserver: `./ana` & visit **localhost:8080** to access your analytics dashboard.
|
||||||
|
|
||||||
|
To start tracking, include the following JavaScript on your site and replace `ana.dev` with the URL to your Ana instance.
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<!-- Ana tracker -->
|
<!-- Ana tracker -->
|
||||||
|
@ -24,3 +36,7 @@ ana('trackPageview');
|
||||||
</script>
|
</script>
|
||||||
<!-- / Ana tracker -->
|
<!-- / Ana tracker -->
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
MIT licensed.
|
||||||
|
|
16
do
16
do
|
@ -1,10 +1,20 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
bin() {
|
install_dependencies() {
|
||||||
go run ana.go
|
go get "github.com/gorilla/sessions"
|
||||||
|
go get "golang.org/x/crypto/bcrypt"
|
||||||
|
go get "github.com/mssola/user_agent"
|
||||||
|
go get "github.com/gorilla/mux"
|
||||||
|
go get "github.com/Pallinder/go-randomdata"
|
||||||
|
go get "github.com/gorilla/handlers"
|
||||||
|
go get "github.com/go-sql-driver/mysql"
|
||||||
}
|
}
|
||||||
|
|
||||||
migrate() {
|
bin() {
|
||||||
|
go build
|
||||||
|
}
|
||||||
|
|
||||||
|
database_migrate() {
|
||||||
export $(cat .env | xargs)
|
export $(cat .env | xargs)
|
||||||
$GOPATH/bin/migrate -url mysql://$ANA_DATABASE_USER:$ANA_DATABASE_PASSWORD@$ANA_DATABSE_HOST/$ANA_DATABASE_NAME -path ./db/migrations $1 $2 $3
|
$GOPATH/bin/migrate -url mysql://$ANA_DATABASE_USER:$ANA_DATABASE_PASSWORD@$ANA_DATABSE_HOST/$ANA_DATABASE_NAME -path ./db/migrations $1 $2 $3
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue