Skip to content

satyasaadhak/onepixel_backend

 
 

Repository files navigation

onepixel (1px.li)

Backend code for the 1px.li URL shortener service.

Status Badges

codecov Build and test

Test Instance

The latest version of the code is automatically deployed via Railway to
https://api.onepixel.link

You can deploy your own instance too Deploy on Railway

Development

Deploy everything (with Docker)

Simplest way to get it running is

  1. make a ./data directory where your database will be stored
  2. run docker-compose up

Run with hot-reload for local development

We will use docker to run an instance of database, but we will run the project using air locally

  1. make a ./data directory where your database will be stored
  2. run docker-compose up -d postgres
  3. add 127.0.0.1 postgres to your /etc/hosts file 1
  4. run air in the root directory of the project 2

Note[1] This is because the server is configured to connect to host=postgres for the database.

Note[2]: you can also run go run src/main.go but it will not reload on changes

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 95.4%
  • Makefile 2.8%
  • Dockerfile 1.8%