Ir para o conteúdo principal
e-Disciplinas
  • Disciplinas »
    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
  • Português - Brasil ‎(pt_br)‎
    Deutsch ‎(de)‎ English ‎(en)‎ Español - Internacional ‎(es)‎ Français ‎(fr)‎ Italiano ‎(it)‎ Português - Brasil ‎(pt_br)‎
  • Fechar
    Alternar entrada de pesquisa
  • Acessar

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

  1. Início
  2. Ambientes
  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

Condições de conclusão
Aberto: quarta-feira, 4 jun. 2025, 08:00
Vencimento: quarta-feira, 11 jun. 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 ►

Blocos

Pular Navegação
  • Início

    • e-Disciplinas

      • Meus Ambientes

      • Tags

      • Pesquisar

      • PáginaSobre

      • PáginaHelp Desk e Contato

      • PáginaGuia

    • Meus Ambientes

    • Ambientes

      • 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

              • Geral

              • 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

                • TarefaExercise 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

      • 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

Blocos suplementares

Você acessou como visitante (Acessar)
Fornecido por Moodle