Giter VIP home page Giter VIP logo

exampleexpressservers's Introduction

Note that all my knowledge comes from Rob Hess: https://web.engr.oregonstate.edu/~hessro/teaching/cs290-sp21

Getting started

You will need to download the files and then run "npm install" to install all the dependencies from the "package.json" file.

Once npm install is done, you should be good to start both the cat server and the dog server.

You will need 2 terminal windows to do this, one for each server. In each window type "npm run catStart" and "npm run dogStart" respectively.

In theory everything should work, and you should be able to access the websites at "localhost:3000" and "localhost:3001" respectively.

Looking into the commands

If you want to look at what the npm commands to, look in the "package.json" file. Note that it uses nodemon to run the servers.

Nodemon is just a version that will restart the server whenever the server file i.e. "CatServer.js" or "DogServer.js" changes

Why does it say get cat photo when it's clearly text?

I struggled a lot with figuring out how to download photos from the internet. it would be nice if someone else would do this, but I will also be looking up ways to do it and will update the github as soon as I have figured out how to get it.

Once you have the img data downloaded it would be as simple to send it as just to add it as a member variable of the object that you send in the response in the server.

Note that I used Git Bash to run the code, but any terminal with node installed should work.

Please let me know if you have any questions.

exampleexpressservers's People

Contributors

jacobeckroth avatar

Watchers

James Cloos avatar  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.