-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
874 changed files
with
124,767 additions
and
13 deletions.
There are no files selected for viewing
73 changes: 60 additions & 13 deletions
73
CC_Caity Croft_Connections Lab Work_Fall 2023_Week 4/technocroft_samples.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,64 @@ | ||
{ | ||
"samples": [ | ||
{ "filename": "KICK 1.wav" , "class": "kick", "id":"audio_techno_vibe_1_kick"}, | ||
{ "filename": "GROOVE 1.wav", "class": "groove", "id":"audio_techno_vibe_1_groove"}, | ||
{ "filename": "BASS 1.wav", "class": "bass", "id":"audio_techno_vibe_1_bass"}, | ||
{ "filename": "KICK 2.wav" , "class": "kick", "id":"audio_techno_vibe_2_kick"}, | ||
{ "filename": "GROOVE 2.wav", "class": "groove", "id":"audio_techno_vibe_2_groove"}, | ||
{ "filename": "BASS 2.wav", "class": "bass", "id":"audio_techno_vibe_2_bass"}, | ||
{ "filename": "KICK 3.wav" , "class": "kick", "id":"audio_techno_vibe_3_kick"}, | ||
{ "filename": "GROOVE 3.wav", "class": "groove", "id":"audio_techno_vibe_3_groove" }, | ||
{ "filename": "BASS 3.wav", "class": "bass", "id":"audio_techno_vibe_3_bass" }, | ||
{ "filename": "KICK 4.wav" , "class": "kick", "id":"audio_techno_vibe_4_kick"}, | ||
{ "filename": "GROOVE 4.wav", "class": "groove", "id":"audio_techno_vibe_4_groove" }, | ||
{ "filename": "BASS 4.wav", "class": "bass", "id":"audio_techno_vibe_4_bass" } | ||
{ | ||
"filename": "KICK 1.wav", | ||
"class": "kick", | ||
"id": "audio_techno_vibe_1_kick" | ||
}, | ||
{ | ||
"filename": "GROOVE 1.wav", | ||
"class": "groove", | ||
"id": "audio_techno_vibe_1_groove" | ||
}, | ||
{ | ||
"filename": "BASS 1.wav", | ||
"class": "bass", | ||
"id": "audio_techno_vibe_1_bass" | ||
}, | ||
{ | ||
"filename": "KICK 2.wav", | ||
"class": "kick", | ||
"id": "audio_techno_vibe_2_kick" | ||
}, | ||
{ | ||
"filename": "GROOVE 2.wav", | ||
"class": "groove", | ||
"id": "audio_techno_vibe_2_groove" | ||
}, | ||
{ | ||
"filename": "BASS 2.wav", | ||
"class": "bass", | ||
"id": "audio_techno_vibe_2_bass" | ||
}, | ||
{ | ||
"filename": "KICK 3.wav", | ||
"class": "kick", | ||
"id": "audio_techno_vibe_3_kick" | ||
}, | ||
{ | ||
"filename": "GROOVE 3.wav", | ||
"class": "groove", | ||
"id": "audio_techno_vibe_3_groove" | ||
}, | ||
{ | ||
"filename": "BASS 3.wav", | ||
"class": "bass", | ||
"id": "audio_techno_vibe_3_bass" | ||
}, | ||
{ | ||
"filename": "KICK 4.wav", | ||
"class": "kick", | ||
"id": "audio_techno_vibe_4_kick" | ||
}, | ||
{ | ||
"filename": "GROOVE 4.wav", | ||
"class": "groove", | ||
"id": "audio_techno_vibe_4_groove" | ||
}, | ||
{ | ||
"filename": "BASS 4.wav", | ||
"class": "bass", | ||
"id": "audio_techno_vibe_4_bass" | ||
} | ||
] | ||
|
||
} |
Binary file not shown.
76 changes: 76 additions & 0 deletions
76
...ll 2023_Week 6/CC_Caity Croft_Connections Lab INCLASSWork_Fall 2023_Week 6_CLASS/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
console.log("This is my server file."); | ||
|
||
//Data | ||
let astronauts = { | ||
"data": [ | ||
{ | ||
"key": "lindgren", | ||
"name": "Kjell Lindgren", | ||
"craft": "ISS", | ||
"wikipedia": "https://en.wikipedia.org/wiki/Kjell_N._Lindgren" | ||
}, | ||
{ | ||
"key": "hines", | ||
"name": "Bob Hines", | ||
"craft": "ISS", | ||
"wikipedia": "https://en.wikipedia.org/wiki/Robert_Hines_(astronaut)" | ||
}, | ||
{ | ||
"key": "yang", | ||
"name": "Liu Yang", | ||
"craft": "Tiangong", | ||
"wikipedia": "https://en.wikipedia.org/wiki/Liu_Yang_(taikonaut)" | ||
} | ||
] | ||
}; | ||
|
||
//5. Require Express | ||
let express = require('express'); | ||
console.log(express); | ||
|
||
//6. Create an app object | ||
let app = express(); | ||
console.log(app); | ||
|
||
//7. Create a Route | ||
app.get('/', (request, response) => { | ||
response.send("This is the main page"); | ||
}); | ||
|
||
//8. Listen | ||
app.listen(3000, () => { | ||
console.log('The server is listening on localhost:3000'); | ||
}); | ||
|
||
//9. Create additional routes | ||
|
||
app.get('/about', (request, response) => { | ||
//response.send("This is my Astronauts page"); | ||
}); | ||
|
||
app.get('/astronauts', (request, response) => { | ||
//response.send("This is my Astronauts page"); | ||
}); | ||
|
||
|
||
app.get('/astronauts/:astronaut', (request, response) => { | ||
let astronaut = request.params.astronaut; | ||
let astronaut_obj; // will hold the value that we'll send back to the client | ||
for (let i = 0; i < astronauts.data.length; i++) { | ||
if (astronaut === astronauts.data[i].key) { | ||
astronaut_obj = astronauts.data[i]; | ||
} | ||
} | ||
// console.log(astronaut_obj); | ||
|
||
if (astronaut_obj) { | ||
//send back the specific object to the client side | ||
response.json(astronaut_obj); | ||
} else { | ||
response.json({ "status": "Data doesn't exist" }); | ||
} | ||
|
||
}); | ||
|
||
//Step 12. Serve static files | ||
app.use('/', express.static('public')); |
1 change: 1 addition & 0 deletions
1
.../CC_Caity Croft_Connections Lab INCLASSWork_Fall 2023_Week 6_CLASS/node_modules/.bin/mime
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.