Git Product home page Git Product logo

damianr2004 / the-web-is-for-everyone-interactive-functionality Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fdnd-task/the-web-is-for-everyone-interactive-functionality

0.0 0.0 0.0 9.95 MB

Ontwerp en maak voor een opdrachtgever een interactieve toepassing die voor iedereen toegankelijk is

Home Page: https://erin-brainy-horse.cyclic.app/

License: MIT License

JavaScript 19.43% CSS 26.31% EJS 54.26%

the-web-is-for-everyone-interactive-functionality's Introduction

the-web-is-for-everyone-interactive-functionality's People

Contributors

damianr2004 avatar joostf avatar ju5tu5 avatar koopreynders avatar

the-web-is-for-everyone-interactive-functionality's Issues

Zet dezelfde GET routes onder elkaar neer

app.get('/ratings', function(request, response) {
        response.render('ratings')
});

app.get('/lijsten', function (request, response) {
    fetchJson('https://fdnd-agency.directus.app/items/f_list').then((apiData) => {
        console.log(apiData.data)
        response.render('lijsten.ejs', {data: apiData.data})
        });
        
})

app.get('/ratings', function (request, response) {
  fetchJson('https://fdnd-agency.directus.app/items/f_list').then((apiData) => {
      console.log(apiData.data)
      response.render('lijsten.ejs', {data: apiData.data})
});

https://github.com/DamianR2004/the-web-is-for-everyone-interactive-functionality/blob/f61d4408006f5d9fc23ab5e4c2242bb3b1d4a71c/server.js#L26C1-L42C4

Zoals hierboven gebruik je twee keer de route /ratings, maak hier een GET route van of zet ze onder elkaar neer.
Zo creëer je meer overzicht binnen je code.

Volgorde van routes

Let op de volgorde van je routes.
De volgorde in je code is nu: /ratings, /lijsten, /ratings, /house, /lijsten/:id.
In je sitemap is de volgorde als volgt: home, lijsten, huis, ratings, users, notities.
Hou de volgorde van je sitemap ook aan in je code.

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.