Skip to content
/ short Public
forked from short-d/short

URL shortening service written in Go and React

License

Notifications You must be signed in to change notification settings

vanya829/short

 
 

Repository files navigation

Short

Build Status codecov Maintainability Go Report Card Open Source Love

Demo

Preview

Demo

Want s/ extension?

Get it from Chrome Web Store or build it from source

Prerequisites

  • Docker v19.03.1

Dependencies

Short is built on top of app, a reusable framework for Go apps & command line tools

Getting Started

Create reCAPTCHA account

Create ReCAPTCHA account

Create Github OAuth App

Create .env file at project root directory with the following content:

DOCKER_IMAGE_PREFIX=local
DB_USER=your_db_user
DB_PASSWORD=your_db_password
DB_NAME=your_db_name
RECAPTCHA_SECRET=your_recaptcha_secret
GITHUB_CLIENT_ID=your_Github_client_id
GITHUB_CLIENT_SECRET=your_Github_client_secret
JWT_SECRET=your_JWT_secret
WEB_PORT=80
API_PORT=8080

Remember to replace the appropriate lines with your db user, db password, db name, and reCAPTCHA secret.

Build docker image

GRAPHQL_BASE_URL=http://localhost:8080 \
HTTP_API_BASE_URL=http://localhost \
RECAPTCHA_SITE_KEY=your_recaptcha_site_key \
./bin/build-web-dev docker build -t short:latest .

docker build -t local/short:latest .

Remember to replace the appropriate line with your reCAPTCHA site key.

Start server

docker-compose up
  1. Visit http://localhost

Contributing

When contributing to this repository, please first discuss the change you wish to make via issues with the owner of this repository before making a change.

Pull Request Process

  1. Update the README.md with details of changes to the interface, this includes new environment variables, exposed ports, useful file locations and container parameters.
  2. You may merge the Pull Request in once you have the sign-off of code owner, or if you do not have permission to do that, you may request the code owner to merge it for you.

Code of Conduct

  • Using welcoming and inclusive language
  • Being respectful of differing viewpoints and experiences
  • Gracefully accepting constructive criticism
  • Focusing on what is best for the community
  • Showing empathy towards other community members

Author

Harry Liu - byliuyang

License

This project is maintained under MIT license

About

URL shortening service written in Go and React

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 61.5%
  • TypeScript 17.1%
  • CSS 8.5%
  • Shell 5.9%
  • JavaScript 4.7%
  • HTML 2.1%
  • Dockerfile 0.2%