mariomenjr / go

A redirect server based on Go and MongoDB.

Home Page:https://go.mariomenjr.com/62773b200af75514e6529b1e

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mariomenjr/go

A redirect server based on Go and MongoDB.

Config

You'll need to provide the following variables in a .env file.

PORT=1993

MONGO_USER=
MONGO_PASS=
MONGO_DB=
MONGO_HOST=
MONGO_PORT=

Database

Once you are connected to a mongodb database, you can start creating a redirect endpoint using the following format:

{
    "_id" : ObjectId("62681fff2e827293a32b0e0c"),
    "created_at" : ISODate("2022-04-26T16:06:05.262Z"),
    "updated_at" : ISODate("2022-04-26T16:06:08.099Z"),
    "title" : "Mario's Github",
    "url" : "https://github.com/mariomenjr",
    "id" : "github"
}

Run

In development:

sh ./setup.sh development

In production:

sh ./setup.sh production

Example

go.mariomenjr.com/github

License

The source code of this project is under MIT License.

About

A redirect server based on Go and MongoDB.

https://go.mariomenjr.com/62773b200af75514e6529b1e

License:MIT License


Languages

Language:Go 62.0%Language:Shell 29.2%Language:Dockerfile 8.8%