package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
"github.com/codegangsta/negroni" | |
jwt "github.com/dgrijalva/jwt-go" | |
"github.com/gorilla/mux" |
package main | |
import ( | |
"github.com/codegangsta/negroni" | |
"github.com/gorilla/context" | |
"github.com/unrolled/render" | |
"labix.org/v2/mgo" | |
"labix.org/v2/mgo/bson" | |
"log" | |
"net/http" |
# Create your superuser | |
$ mongo | |
> use admin | |
> db.createUser({user:"someadmin",pwd:"secret", roles:[{role:"root",db:"admin"}]}) | |
> exit | |
# Alias for convenience (optional and at your own risk) | |
$ echo 'alias mongo="mongo --port 27017 -u someadmin -p secret --authenticationDatabase admin"' >> ~/.bash_profile | |
$ source ~/.bash_profile |
Let's set up Camlistore on a Linux server, with blobs stored in s3. This seems to be the currently best-supported option for "cloud" deployment.
This is meant as a supplement to the official server config doc. Read through both docs before you start.
http://camlistore.org/docs/server-config
This blog post is also recommended reading.
I've posted my config files for reference, but they will be created the first time you run camlistored
(for the server) and camput init
(for the client) so don't copy them.
WARNING: This gist was created in 2013 and targets the legacy GOPATH mode. If you're reading this in 2021 or later, you're likely better served by reading https://tip.golang.org/cmd/go/#hdr-Configuration_for_downloading_non_public_code and https://golang.org/ref/mod#private-modules.
$ ssh -A vm
$ git config --global url."git@github.com:".insteadOf "https://github.com/"
$ cat ~/.gitconfig
[url "git@github.com:"]
insteadOf = https://github.com/
$ go get github.com/private/repo && echo Success!
Success!