Skip to content

Andy-Wu12/Paw-Prints

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

View Some Dogs

This is a Node.js web application using the Koa and React web frameworks.

Getting started

You will need to install Node.js.

For best results, use Node.js 16 or higher.

You can check your current version of Node.js with

$ node --version
v16.17.0

Open two terminal sessions. They will be for running the frontend and backend separately.

To start up the server in the backend,

cd backend
npm install
npx ts-node server.ts

Alternatively, you can run with the compiled server code

npm run deploy

Check the package.json for more possible commands

If the server starts successfully, you will see

Server running on http://localhost:8080

in the terminal.

To start up the frontend run

cd frontend
npm install
npm run start

in your other terminal tab.

Note that npm install in this case will result in a few high severity vulnerabilities being discovered. However, this is just a false positive which you can read more about from a Meta engineer himself here

If the server starts successfully, you will see

You can now view dogs in the browser.

  Local:            http://localhost:3000
  On Your Network:  http://networkaddress:3000

Note that the development build is not optimized.
To create a production build, use npm run build.

webpack compiled successfully

In your browser

Once both servers are started, you can navigate to:

  1. Application website - http://localhost:3000
  2. Server w/ endpoints - http://localhost:8080

Documentation