Giter Club home page Giter Club logo

cypress-heroes's Introduction

Cypress Heroes Demo Application

This is a demo application that shows how to use Cypress to run end-to-end, component, and API tests against an application.

Getting Started

The app is a mono repo that uses npm workspaces. Once you clone the project, install the dependencies at the root folder:

npm install

After that a few more things need to be set up (databases and such), to do so run:

npm run setup

To launch the app for development, run:

npm run dev

This will start both the client and server apps in dev mode. The site will be available at http://localhost:3000.

App Overview

The Cypress Heroes app consists of a frontend client app written in React that uses Vite, as well as a backend app that uses NestJS.

React Client App

The React client app is located in the client folder. It is a standard React Vite app.

Todo: fill out

NestJS Server App

The server app is in the server folder. It is built with the NestJS Node.js framework. It uses Prisma for the database ORM.

Database seeding and resetting

The database is seeded from the server/prisma/seed.ts script when you set up the app. If at any time you want to reset the database back to its initial state, run:

npm run resetdb

Environment Variables

The client app uses an environment variable to know what the URL is for the backend api named VITE_API_URL. It defaults to "http://localhost:3001" for use in dev mode, and should be overriden in other environments/modes.

cypress-heroes's People

Contributors

elylucas avatar

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.