events-system's People
events-system's Issues
Anche qui utilizziamo path.join
events-system/routes/events.js
Line 105 in 71b3bfb
Utilizzo delle promises
vedi #5
events-system/routes/managers.js
Line 37 in 2b4873c
register multipart
events-system/routes/managers.js
Line 18 in 71b3bfb
Aggiungere lo script di linting
Sarebbe opportuno aggiungere nella sezione script il comando
...
"script": {
"lint": "standard --verbose",
....
}
....
Line 10 in 71b3bfb
Verifichiamo le varie options di fastify-multipart
Per esempio limitiamo la grandezza dei files ad 1Mb
Utilizziamo fastify-static per la gestione delle foto
Proviamo ad utilizzare fastify-static https://github.com/fastify/fastify-static
Nelle put questo controllo non serve se ci pensi
events-system/routes/managers.js
Line 164 in 4285053
Utilizziamo un ciclo for of
Ti sconsiglio di usare forEach piuttosto usa
for (const image of body.images) {}
oppure
for (const image of body.images) {}
events-system/routes/events.js
Line 84 in 71b3bfb
Spostiamo la register del plugin nella directory plugins
Come da titolo
events-system/routes/events.js
Line 19 in 71b3bfb
Non hai la necessità di utilizzare `${file}` ma semplicemente file
events-system/routes/events.js
Line 107 in 71b3bfb
Eliminiamo questo file
N.B. Non ti dimenticare di spostare la ricerca nel get all events
Line 1 in 71b3bfb
Utilizziamo il modulo path
Utilizziamo il modulo path https://nodejs.org/docs/latest-v12.x/api/path.html
events-system/routes/events.js
Line 35 in 71b3bfb
Non utilizzare console.log
Se hai la necessità di loggare informazioni di debug usa il logger fastify (PINO)
https://www.fastify.io/docs/latest/Logging
events-system/routes/events.js
Line 41 in 71b3bfb
Correggiamo lo schema response
events-system/routes/events.js
Line 196 in 71b3bfb
ATTENZIONE all'utilizzo delle promises!
O utilizzi l'approccio
.then()
.catch()
o
async/await
events-system/routes/events.js
Line 58 in 71b3bfb
Rinominare la folder public in static
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.