Skip to content

Amoralchik/Shortener

Repository files navigation

Description

#Create account
POST http://localhost:3000/user
  # form: {
  #   username: 'string'
  #   email: '[email protected]'
  #   password: 'password'
  # };

# Login
POST http://localhost:3000/auth/login
  # form: {
  #   username: '[email protected]'
  #   password: 'password'
  # };

# Create shortlink
POST http://localhost:3000/u
  # form: {
  #   originalUrl: "https://github.com/Amoralchik/server"
  # };
  # response: "http://localhost:3000/u?n=vIF4XPoLT7"

# Using shortlink
GET http://localhost:3000/u?n=vIF4XPoLT7
  # Redirect to "https://github.com/Amoralchik/server"

Installation

$ yarn install

Running the app

Rename .env.example to .env

change JWT_SECRET optional change SALT_ROUNDS

# docker with postgresql and server with watch mode
yarn run docker:up
# development
$ yarn run start

# watch mode
$ yarn run start:dev

# production mode
$ yarn run start:prod

Test

# unit tests
$ yarn run test

# e2e tests
$ yarn run test:e2e

# test coverage
$ yarn run test:cov

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published