Tuesday, 17 December 2019

My Sequelize Tutorial

Hey everyone! I was looking for a community to post this into and found r/node. If this isn't an appropriate post for the subreddit, please let me know! I picked r/node because there isn't a Sequelize subreddit and Sequelize required Node.I built a tutorial revolving around using Sequelize, primarily for beginners, and would like some feedback on my tutorial. I've asked colleagues and friends for feedback, and so far it has been positive. I'm looking for a wider audience to give me feedback, since I want to make my tutorial the best it can be. I've put a lot of effort into writing this and am looking for constructive criticism. Before submitting feedback, please understand it is still a work in progress! A lot of Sequelize functionality is still missing from it, such as deleting information from a table, deleting data from associations, many to many associations, and so on.https://github.com/rlorenzini/mySequelizeTutorialA little background for those who are curious. I am a new developer (just over 1 year of coding experience) who went through a bootcamp in Houston. Once I graduated, I became a teacher's assistant. When we started covering the backend (Node.js, Express, pg-promise, Sequelize, postgreSQL, and more) a lot of students were struggling with Sequelize. Personally, I love Sequelize. I never liked creating a bunch of functions to run pg-promise commands when there was a library which already did that for me. I also struggled to grasp pg-promise at the time, so I gravitated to Sequelize.When I asked some students, they told me the documentation was confusing and difficult to follow. The Sequelize documentation is extensive with literally everything, but I never go there because it is written so poorly. I always went to alternate websites or medium articles to get help with Sequelize. One student specifically said, "Why is there no good single source for Sequelize?" It dawned on me I could be the one to make such a thing. Thus, my tutorial was born!I've been working on it consistently as a sort of pet project / passion. I've always enjoyed writing documentation and reports, but technical tutorials are new to me. That's why I'm here asking for feedback! Thanks in advance.

Submitted December 17, 2019 at 03:44PM by potatoCoding

34 most popular GitHub JS repositories in November 2019

https://medium.com/Iren.Korkishko/34-most-popular-github-js-repositories-in-november-2019-d03f34a30de6?source=friends_link&sk=db0052cc0cccbc9091c4fa78eb17282b

Submitted December 17, 2019 at 01:42PM by Fewthp

Admin system for Node?

I'm using express , mongoose and ejs. And I'm trying to make a cool science website(like https://www.livescience.com/).It's hard to make posts without admin system(like django admin or strapi). I wonder , Is there an admin system for node js? I make articles but i can't space between lines . I need a rich text editor to save to mongoose. Can you help me about it ?I used Froala. But I couldn't figure it out how to save texts.

Submitted December 17, 2019 at 01:07PM by Varenberg

What is the meaning of "normalizedArgsSymbol" in lib/net.js in node.js?

What is the meaning of "normalizedArgsSymbol" used in "function normalizeArgs(args)" defined in lib/net.js in node.js?

Submitted December 17, 2019 at 01:28PM by procastinator_10

Do you develop-on or only deploy-to Kubernetes

Kubernetes has been making waves! I suppose many are including it in their workflow. But is it a part of your development cycle? or is it only a deployment target ?

Submitted December 17, 2019 at 01:05PM by ak_kim0

Litekart - Fastest Javascript Ecommerce using Svelte/Sapper

Litekart is the fastest e-commerce built using javascript fullstack (NodeJS + MongoDB). The server rendered mode increases the SEO power of the e-commerce. Attach any e-commerce backend and you are live. For a live running ecommerce using the technology have a look at HopyshopyBuilt for speedFollowing are the test results when all servers (Elasticsearch, Node, Static Server, Client) give a ping response <100 ms. The demo app hopyshopy.com is hosted at Mumbai (India), If you are testing from another country, the results my vary.Solution to the above issue is to use a CDN. I am trying to find sponcers to migrate all to a CDN in near future.Google Lighthouse/Pagespeed Audit Score (Search Page)​https://preview.redd.it/36p7cl3a96541.jpg?width=1086&format=pjpg&auto=webp&s=96634e59af0fa2bc61f024300b29657614de2724Google Lighthouse/Pagespeed Audit Score (Detail Page)​https://preview.redd.it/rfffgm0b96541.jpg?width=1077&format=pjpg&auto=webp&s=340a02947a4ad8e03e527f7c94c7a805cb2bc112What is Litekart?Litekart is a storefront for your existing eCommerce.It is possible to connect with any eCommerce backendNo need to make a big leap or invest huge amount. Just take this opend source project and attach to existing backend.InstallationInstall - NodeJS - Yarn - Gitgit clone https://github.com/itswadesh/sapper-ecommerce.git cd sapper-ecommerce yarn yarn dev Thats all !Open http://localhost:4400 on chrome. Your app should be liveDeploymentSetup devops/live.js (Change according to your hosting envirnoment)const PM2_NAME = 'h' const REMOTE_DIR = '/var/www/hopyshopy/www' const REMOTE_HOST = '165.22.222.60' const REMOTE_USER = 'root' Rename sample.env to .env and enter your server private keyNextyarn live ​https://preview.redd.it/o2vapr6m96541.jpg?width=433&format=pjpg&auto=webp&s=dd87353fa91f06f03b69a06543910750bdf70b9bConfigurationsIf required change src/config.jsaccording to your requirementFeaturesTailwindCSS IntegratedServer RenderedProxy + API integratedLazy loading imagesAnimations (Page transition)LoginCart & CheckoutSettings from databaseStoresSEO optimized pagesCarousel (Slider)Loading IndicatorsComponentized Checkbox, Radio, TextboxInstant SearchFaceted filters1 click deploy to live serverAPI callsSkeletonsResponsiveFontawesomePWA>90PWA scorefilters: First, Date, Truncate, CurrencyGenerate production version files with css minifiedPUT, POST, DELETE calls with Bearer AuthorizationStoring tokens into cookieLoader on route change with 100ms delayIntegrated Google Analytics

Submitted December 17, 2019 at 10:47AM by itswadesh

nodejs contact form success message

hope someone can help....here's the code on app.js:app.post("/send", (req, res) => { const output =

You have a new contact request

Contact Details

  • Name: ${req.body.name}
  • Email: ${req.body.email}
  • Website: ${req.body.website}

Message

${req.body.message}

;​contact form:


On my localhost environment I get the Success feedback msg. But online (deployed on webserver), I don't see anything. Any ideas?

Submitted December 17, 2019 at 10:57AM by nightcrawler99