GithubHelp home page GithubHelp logo

m-zubairahmed / atomurl Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 24.41 MB

A URL shortner package

Home Page: https://atomurlapp.herokuapp.com/

License: MIT License

Go 32.26% HTML 11.21% JavaScript 50.34% CSS 6.19%
golang reactjs url-shortener

atomurl's Introduction

atomurl's People

Contributors

dependabot[bot] avatar m-zubairahmed avatar

Stargazers

 avatar

Watchers

 avatar

atomurl's Issues

Server side error reporting on wrong field

Describe the bug
The server sided bugs are being reported on wrong frontend field.

To Reproduce
Steps to reproduce the behavior:

  1. Enter wrong or invalid distination url

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.
image

Desktop (please complete the following information):
All

Smartphone (please complete the following information):
All

Additional context

Remove double concat

Remove print.sprint as + is already concatening in

atomURL/main.go

Line 188 in da5bd77

databaseURL := fmt.Sprint(databaseHost + "://" + databaseUserName + ":" + databaseUserPassword + "@" + databaseAddress + "/" + databaseName)

Simplify getting env

Instead of this

atomURL/main.go

Lines 163 to 186 in da5bd77

databaseHost := os.Getenv("DB_HOST")
if os.Getenv("DB_HOST") == "" {
log.Fatal("No Database host provided eg. <mongodb>://")
}
databaseUserName := os.Getenv("DB_USER")
if os.Getenv("DB_USER") == "" {
log.Fatal("No Database user name provided")
}
databaseUserPassword := os.Getenv("DB_PASSWORD")
if os.Getenv("DB_PASSWORD") == "" {
log.Fatal("No Database user's password provided")
}
databaseAddress := os.Getenv("DB_URL")
if os.Getenv("DB_URL") == "" {
log.Fatal("No Database URL provided")
}
databaseName := os.Getenv("DB_NAME")
if os.Getenv("DB_NAME") == "" {
log.Fatal("NO Database name provided")
}

Do this
image

use default gin

Replace with gin.Default() for other defaults in the router, and remove explicitly adding logging etc.

Dont load whole of fontawesome

Is your feature request related to a problem? Please describe.
Blog of request for all of fontawesome

Describe the solution you'd like
Store locally icons required

Describe alternatives you've considered
none

Additional context
none

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.