Zum Hauptinhalt
e-Disciplinas
  • Disciplinas »
    2027 2026 2025 2024 2023 2022 2021 2020 2019 2018 2017 2016 2015 2014 2013 2012 AACCs/FFLCH Pró-Reitoria de Pós-Graduação Outros
  • Suporte »
    Acesso Perfis Ouvintes Docentes Criação de Disciplinas da USP Documentação HelpDesk e Contato Guia de uso Sobre
  • Deutsch ‎(de)‎
    Deutsch ‎(de)‎ English ‎(en)‎ Español - Internacional ‎(es)‎ Français ‎(fr)‎ Italiano ‎(it)‎ Português - Brasil ‎(pt_br)‎
Systemweite Suche Schließen
Sucheingabe umschalten
Acessar

SCC0219 - Introdução ao Desenvolvimento Web (2025)

  1. Startseite
  2. Kurse
  3. 2025
  4. ICMC
  5. SCC
  6. SCC0219-2025
  7. Module 8: Node.js/ExpressJS
  8. Exercise 17: Node.js Mongo Backend

Exercise 17: Node.js Mongo Backend

Abschlussbedingungen
Geöffnet: Mittwoch, 4. Juni 2025, 08:00
Fällig: Mittwoch, 11. Juni 2025, 12:00

Exercise 17: Node.js Mongo Backend


Upload a JavaScript file named USPnumber1.USPnumber2.js. If you need to upload a file after the deadline, use late.USPnumber1.USPnumber2.js

Exceptionally, if you alread made the backend in multiple files, you may use a .zip file.

Write a CRUD implementation for the products in your Online Store using MongoDB. A product must be specified using Mongoose and have a name, slug, description, price, and quantity. There is no need for user authentication. 

To test, you can use Insomnia or modify the client code below. You can use this implementation with the client code of your store already on GitHub, adding users, orders, etc.


Tip: The video lesson shows how to implement a CRUD backend (with the GET, PUT, POST, and DELETE HTTP methods) using MongoDB.

Test app (test.html):

<!DOCTYPE html>
<html>
  <meta>
    <meta charset="UTF-8">
    <title>User Info</title>
  </meta>
  <body>
    <div id="app">
      <h2>User Information</h2>
      <label>Username</label> <input v-model="username" type="text"> 
      <br> <br>
      <label>Password</label> <input v-model="password" type="text">
      <br> <br>
      <label>Email</label>    <input v-model="email"    type="text">
      <br> <br>
      <label>Address</label>  <input v-model="address"  type="text">
      <br> <br>
      <input type="button" value="Read" @click="read">
      <input type="button" value="Delete" @click="read">
      <input type="button" value="Create" @click="read">
    </div>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.1.6/vue.min.js">
    </script>
    <script>
      new Vue({
        el: "#app",
        data: {
            username: "john",
            password: "",
            email: "",
            address: ""
        },
        methods: {
           read: async function() {
   try {
     let resp = await fetch("http://www.mocky.io/v2/5ecc1c79300000fceadddb15");
     resp = await resp.json();
     console.log("resp: "+JSON.stringify(resp));
     this.username= resp.username;
     this.password= resp.password;
     this.email = resp.email;
     this.address= resp.address;
   }
   catch (e) {alert("Error: " + e);}
           }
        }
      });
    </script>
  </body>
</html>

◄ Quiz 9
Quiz 10 ►

Blöcke

Navigation überspringen
  • Startseite

    • e-Disciplinas

      • Meine Kurse

      • Tags

      • Suchen

      • TextseiteSobre

      • TextseiteHelp Desk e Contato

      • TextseiteGuia

    • Meine Kurse

    • Kurse

      • 2025

        • CENA

        • EACH

        • ECA

        • EE

        • EEFE

        • EEFERP

        • EEL

        • EERP

        • EESC

        • EP

        • ESALQ

        • FAU

        • FCF

        • FCFRP

        • FD

        • FDRP

        • FE

        • FEA

        • FEARP

        • FFCLRP

        • FFLCH

        • FM

        • FMBRU

        • FMRP

        • FMVZ

        • FO

        • FOB

        • FORP

        • FSP

        • FZEA

        • IAG

        • IAU

        • IB

        • ICB

        • ICMC

          • SMA

          • SME

          • 550

          • SSC

          • SCC

            • TCCs do SCC

            • SCC0211-2025

            • SCC5920--2025

            • SCC0124-201-2025

            • SCC0283-201-2025

            • SCC0271-201-2025

            • SCC0230-202-2025

            • SCC5878-2025

            • SCC0233-201-2025

            • SCC0295-201-2025

            • ED - SCC0122 - 2025

            • SCC0634-201-2025

            • SCC0245-201-2025

            • SCC0607-201-2025

            • SCC0220-201-2025

            • LabBD-SCC0641-2025

            • SCC0560-201-2025

            • SCC5836--2025

            • SCC0252-201-2025

            • SCC0219-201-2025

            • SCC0202-2025

            • SCC5977--2025

            • SCC5809--2025

            • SCC5960--2025

            • SCC5959--2025

            • SCC5952--2025

            • SCC0277-201-2025

            • SCC0218-2025

            • SCC0227/SCC0229--2025

            • SCC0505--2025

            • SCC5832--2025

            • SCC0205-202-2025

            • SCC0205-201-2025

            • SCC0502-201-2025

            • SCC0223-201-2025

            • SCC0207-2025

            • SCC0580-201-2025

            • SCC0302-2025

            • SCC5949--2025

            • SCC5982--2025

            • SCC0216-2025

            • SCC0219-2025

              • Allgemeines

              • Group Assignment

              • Course Introduction

              • Module 1: HTTP Protocol

              • Module 2: HTML

              • Module 3: CSS

              • Module 4: JavaScript

              • Module 5: DOM & Events

              • Module 6: AJAX Calls

              • Milestone 1

              • Module 7: React or Vue

              • Module 8: Node.js/ExpressJS

                • AufgabeExercise 17: Node.js Mongo Backend

              • Milestone 2

              • Module 9: NoSQL Databases

              • Final Presentations

              • Final Test

          • EST

          • MAI

          • SMA

        • IEB

        • IEE

        • IF

        • IFQSC

        • IFSC

        • IGc

        • IME

        • IO

        • IP

        • IPEN

        • IQ

        • IQSC

        • IRI

        • HRAC

        • MAC

        • MAE

        • MP

        • MZ

        • RUSP

      • 2027

      • 2026

      • 2024

      • 2023

      • 2022

      • 2021

      • 2020

      • 2019

      • 2018

      • 2017

      • 2016

      • 2015

      • 2014

      • 2013

      • 2012

      • Grupos de Estudos, Pesquisa e Outros

      • PRPG - Pró-Reitoria de Pós-Graduação

      • STI

Ergänzungsblöcke

Sie sind als Gast angemeldet (Anmelden)
Powered by Moodle