/Activity_Fetch

A simple Typescript and Koa project to fetch a picture of a dog and a random activity.

Primary LanguageJavaScript

dogs

This project is a Node.js web server using the Koa framework. There is also a plain web page that has already been written, located in /public, which will be used as the UI.

Relevant documentation:

Getting started

To run the server, you need Node.js >= 14 installed.

You can check your current version of Node.js like this:

$ node --version
v14.16.0

If you have Node 14 or above, you can then run the following.

npm install
node index.js

If the server starts successfully, you will see this:

Server running on http://localhost:3011

Visiting this URL, you should see "hello!"

This is just a sample output. You will need to change this to serve the static assets. https://koajs.com/ is the best place to read up on how to do this.


Additional Specifications

Language: Typescript

CSS Framework: Milligram

Testing Framework: ts-Jest (Jest addition to enable typescript testing)

koa-ejs for serverside html template rendering


Dog images obtained from: Dog CEO

Activity suggestions obtained from: Bored API