spacetoastcoasttocoast / express-gallery Goto Github PK
View Code? Open in Web Editor NEWThis project forked from devleague/express-gallery
Express, Sequelize, HTML5 on Postgres
This project forked from devleague/express-gallery
Express, Sequelize, HTML5 on Postgres
Seems that body-parser
and your custom middleware called validation
is not used. Consider removing them.
https://github.com/SpaceToastCoastToCoast/express-gallery/blob/master/routes/gallery.js#L3-L4
one example: https://github.com/SpaceToastCoastToCoast/express-gallery/blob/master/views/edit.pug#L1
you can omit the .pug extension
Find and replace throughout project, Thanks!
When I navigate to the image detail page (http://localhost:7000/gallery/1), I get this error on the server:
you can omit the .js
when using require('...')
npm i
npm i -g gulp
sequelize db:seed:all
gulp
PROFIT!
I like breaking up my SCSS file into partials that correspond with a page - it makes your code more modular and scalable.
i.e. email (isEmail) - required, isUnique etc
For more info, check out this link:
http://docs.sequelizejs.com/en/latest/docs/models-definition/#validations
Move the routes logic into seperate routes directory.
Unnecessary Template Literal:
https://github.com/SpaceToastCoastToCoast/express-gallery/blob/master/views/new.pug#L6
Use ID Literal feature:
https://github.com/SpaceToastCoastToCoast/express-gallery/blob/master/views/layout.pug#L9
https://github.com/SpaceToastCoastToCoast/express-gallery/blob/master/views/gallery.pug#L13
Use Class Literal feature:
https://github.com/SpaceToastCoastToCoast/express-gallery/blob/master/views/404.pug#L9
Use HTML Entity code for spaces
:
https://github.com/SpaceToastCoastToCoast/express-gallery/blob/master/views/photo.pug#L22
https://github.com/SpaceToastCoastToCoast/express-gallery/blob/master/views/photo.pug#L7
Remove <br>
usage and replace with styling via CSS file:
https://github.com/SpaceToastCoastToCoast/express-gallery/blob/master/views/new.pug#L17-L18
You need to make all CRUD operations functional from the browser
Currently, after adding a new image and returning back to the index page you will notice that the most recently added image appears near the bottom of the list.
Consider changing it so that the new additions appear first (at top of section).
In the image below, the trump image is the new addition, notice how it appears last:
STR:
Notice that you are shown the JSON response. User should be redirected to either the photo listing page or to the details page for the newly created image.
current response detail:
{
"success": true
}
{ Error: ENOENT: no such file or directory, scandir './logs/'
at Error (native) errno: -2, code: 'ENOENT', syscall: 'scandir', path: './logs/' }
Executing (default): SELECT "id", "title", "description", "author", "link", "hashtags", "createdAt", "updatedAt", "UserId" FROM "Photos" AS "Photo";
{ Error: ENOENT: no such file or directory, scandir './logs/'
at Error (native) errno: -2, code: 'ENOENT', syscall: 'scandir', path: './logs/' }
Make it easy for users to clone your repo and get setup - give them a sample file they can file in to get setup quickly
i.e /gallery/aksjdkalsjdkalsjdlakjs does not return 404
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.