A link shortener built using:
- Node 14+
- Yarn (
npm install -g yarn
) - Docker
-
Clone this project
-
Install dependencies
$ yarn
-
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
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, useyarn db:migrate
after the database is already running.yarn docker:rebuild
- Rebuilds the Docker containers. Use this when changes are made to app files.
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