GithubHelp home page GithubHelp logo

josue9405 / students-js Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 407 KB

Proyecto en Node JS y exposición de API a través de Express Server

JavaScript 100.00%
express express-js expressjs javascript jest node nodejs

students-js's Introduction

Student-JS

Proyecto en Node JS y exposición de API a través de Express Server

¿Qué contiene?

  • JavaScript
  • Node
  • Express Server
  • Jest
  • Eslint

¿Cómo funciona?

Para iniciar la aplicación es necesario contar con NodeJS, con esta herramienta debemos ejecutar el siguiente comando en el terminal de tu equipo: npm run server

Una vez iniciado el aplicativo, veremos en consola el siguiente mensaje:

image

Consumiendo el API

Con la aplicación iniciada, debemos ir a nuestro navegador o aplicación cliente de API de nuestra preferencia, por ejemplo Postman, en este proyecto contamos con los siguientes puntos de consumo:

Endpoint Método HTTP Ejemplo
/v1/students/:studentname GET http://localhost:3000/v1/students/Bennett
/v1/students/credits/:credits GET http://localhost:3000/v1/students/credits/900
/v1/students/certifications/:certification GET http://localhost:3000/v1/students/certifications/true

student_js

Estructura del proyecto

image

Contamos un archivo de datos JSON, el cual tiene el nombre `visualpartners.json`. Dicho archivo será leido por la clase Reader y la biblioteca File System, para manipular el contenido es enviado a la clase StudentService. El cual contiene toda la lógica para aplicar los filtros sobre la colección de datos.

Pruebas con Jest

El software lleva pruebas y punto...

Como una buena práctica, debemos realizar pruebas de nuestro código. Para ello contamos con múltiples herramientas, en este proyecto se utilizó Jest y para ejecutar las pruebas ejecutaremos en nuestro terminal npm test student_test_js

Si todo funciona bien, no te fies, una prueba que no falla al menos una vez, no es óptima.

¿Algo no funciona?

  • Que no panda el cunico!

Si tienes dudas o no funciona correctamente, con toda confianza enviame un ticket de incidencia y lo revisamos

students-js's People

Contributors

dependabot[bot] avatar josue9405 avatar

Watchers

 avatar

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.