Skip to content

URL shortener webapp written with golang(echo) and angular

Notifications You must be signed in to change notification settings

mh-zeynal/shortener-service-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

shortener service


contents

About the project

A URL shortener service is a tool that takes a long, unwieldy web address and creates a much shorter, more manageable version of it. This shorter version of the URL is easier to share, particularly on social media sites like Twitter where character limits are in place.


run project without docker

if you want to run the project without using docker:

requirements

  • Angular CLI: 12.2.16
  • go 1.16.6
  • npm 8.12.1 → node v16.16.0

install dependencies

  1. go to back-end directory and run
go get -u -v all

the output must be something as below

go: downloading github.com/golang-jwt/jwt/v4 v4.5.0
go: downloading github.com/labstack/gommon v0.4.0
go: downloading golang.org/x/crypto v0.7.0
go: downloading github.com/mattn/go-colorable v0.1.13
go: downloading github.com/valyala/fasttemplate v1.2.2
go: downloading github.com/mattn/go-isatty v0.0.17
...
  1. go to front-end directory and run
npm install
  1. open your mysql command line. Then go to back-end/requirements and run these
source service_users.sql
source urls.sql

launch

1.there's a .env file in back-end directory. In order to give database access the app, you can change your database details there.

  1. inside back-end directory run
go run main.go
  1. inside front-end directory run
ng serve

now you can use the web app. start your journey by sending request to http://localhost:4200/ home page preview:
good luck :)


use project through docker

this section is in progress.
stay tuned 😶