MarceloAlves / shorty

A link shortener

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shorty

A link shortener built using:

Getting Started

Requirements

  • Node 14+
  • Yarn (npm install -g yarn)
  • Docker

Running the project locally

  1. Clone this project

  2. Install dependencies

    $ yarn
  3. Start server Note: This will automatically run DB migrations before starting the server.

    $ yarn docker:start

The app will be available at http://localhost:3001

To shut down and remove the running containers containers use:

$ yarn docker:stop

Other Run Options

  • yarn dev - Start the database container and run the development Next.js server locally. Using this command will not automatically run database migrations. To run migrations yourself, use yarn db:migrate after the database is already running.
  • yarn docker:rebuild - Rebuilds the Docker containers. Use this when changes are made to app files.

Running Tests

There are two different types of tests available.

For Cypress tests, start the docker container with yarn docker:start, then:

To run the Cypress tests without opening the Cypress UI + Browser:

$ yarn cypress:run

If you'd like to open the Cypress UI and manually run the tests:

$ yarn cypress:open

To run the react-testing-library tests:

$ yarn test

About

A link shortener


Languages

Language:TypeScript 53.9%Language:JavaScript 40.7%Language:Dockerfile 3.8%Language:Shell 1.6%