Skip to content

MsQCompSci/melodyAppSetup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Melody App Starter Code

Starter code for the Melody App tutorial using p5.js, Node.js and Express.js. This code is developed in detail in the Getting Started with Node.js tutorial

Steps:

1. Download and unzip this repository

2. Open the terminal on your computer, and ensure node.js is installed on your device by typing:

node -v and npm -v

3. If node.js is not installed:

Follow step 2 in Get Started with Node.js

3. If node.js is installed:

Install Express.js in your project directory by creating a package.json file.

  • Open a command prompt window on your computer (Terminal on Mac or Command Shell on Windows)
  • In the command prompt window, navigate to the directory with this file. If you saved this file in your downloads folder you can type cd/downloads/melodyAppSetup-main and press return
  • Create a package.json file by typeing npm init -y and pressing return
  • Install Express.js by typing npm install express and pressing return
  • Verify installation by typing npm list and pressing enter Your terminal should display a tree structure listing all npm packages installed on your computer. If Express.js is installed in your directory, you should see something similar to this:
[email protected] /Users/..filepath
└── [email protected]

Visit this tutorial for more information on Express.js, and Get Started with Node.js for helpful steps and tips if you get stuck.

4. Run the server by typing:

node server.js in the terminal

5. Visit http://localhost:3000 using your browser and inspect the console.

You should see a JSON object like this printed to the console:

Object i
  files: Array(3)
    0: “C Major Scale.json”
    1: “Frere Jacques.json”
    2: “Mary's Lamb.json”
    length: 3
//…prototype

This starter code already prints the filenames from the songs file in your browsers console!

You are ready to continue with the Melody App tutorial!

You can also read more aboute the p5.Oscillator library here

About

Starter code for the Melody App tutorial using p5.js, Node.js and Express.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published