Bookmarks tagged [expressjs]
https://thecodebarbarian.wordpress.com/2014/09/04/defending-against-query-selector-injection-attacks...
This article shows two simple ways to protect against the attacks described in Hacking NodeJS and MongoDB. One of the them is by...
- tags: mongodb, node.js, expressjs, security
- source code
https://www.youtube.com/watch?v=iZl7R6ntOGc
In this video I go over how to clone the reveal.js github repository and alter the demo's html file to read content from a markdown file. We then use a node.js express server to serve the markdown fil...
https://www.codepedia.org/ama/complete-example-crud-api-express-graphql
CRUD API example implemented with GraphQL-js and expresss-graphql acting as integration point to the existing REST API supporting Bookmarks.dev
- 📆 published on: 2020-11-10
- tags: graphql, expressjs
- source code
https://expressjs.com/en/guide/behind-proxies.html
When running an Express app behind a proxy, set (by using app.set()) the application variable trust proxy to one of the values listed in the following table.
- tags: expressjs, proxy, reverse-proxy, nginx
https://nodesource.com/blog/nine-security-tips-to-keep-express-from-getting-pwned
Security is really hard to get right. There are so many different factors to consider, countless different ways to break an application.
This is just as true with Express applications as it is with a...
https://github.com/ded/express-limiter
Rate limiting middleware for Express
- tags: expressjs, rate-limiting, redis
- source code
https://github.com/nfriedly/express-rate-limit
Basic rate-limiting middleware for Express. Use to limit repeated requests to public APIs and/or endpoints such as password reset.
- tags: expressjs, rate-limiting
- source code
Helmet helps you secure your Express apps by setting various HTTP headers. It’s not a silver bullet, but it can help!
- tags: expressjs, security, helmet
- source code
https://developer.okta.com/blog/2018/09/13/build-and-understand-express-middleware-through-examples
If you’ve done any significant Node development in the past seven or eight years, you’ve probably used Express to build a web server at some point. While you can create a server in Node without using ...
- tags: expressjs, middleware
https://expressjs.com/en/guide/using-middleware.html#middleware.application
Express is a routing and middleware web framework that has minimal functionality of its own: An Express application is essentially a series of middleware function calls.
Middleware functions are func...
https://www.codepedia.org/ama/key-takeaways-when-using-oas-3-to-document-an-expressjs-rest-api
Recently I’ve taken the time to update the API documentation for bookmarks.dev. I used the Swagger 2.0 (aka OAS 2) before and I decided to update to OpenAPI Specification (OAS) 3. In this post I will ...
- 📆 published on: 2020-02-20
- tags: openapi, expressjs, node.js
- source code
https://github.com/badunk/multer-s3
multer storage engine for amazon s3
- tags: multer, amazon-s3, aws, expressjs, file-upload
- source code
https://github.com/expressjs/multer
Multer is a node.js middleware for handling multipart/form-data
, which is primarily used for uploading files. It is written on top of busboy for maximum efficienc...
https://expressjs.com/en/guide/error-handling.html
Error Handling refers to how Express catches and processes errors that occur both synchronously and asynchronously. Express comes with a default error handler so you don’t need to write your own to ge...
- tags: expressjs, error-handling
https://www.codepedia.org/ama/cleaner-code-in-expressjs-rest-api-with-custom-error-handling
Shows how you can make your backend ExpressJS REST API cleaner by using custom error handling middleware. Code snippets of before and after refactoring are presented to make the point
- 📆 published on: 2019-12-02
- tags: expressjs, node.js, error-handling, async-await
- source code
https://github.com/davidbanham/express-async-errors
async/await support for ExpressJS. Contribute to davidbanham/express-async-errors development by creating an account on GitHub.
https://strongloop.com/strongblog/async-error-handling-expressjs-es7-promises-generators/
This article focuses on effective ways to capture and handle errors using error-handling middleware in Express.
- 📆 published on: 2015-04-21
- tags: javascript, error-handling, ecmascript-6, ecmascript-7, async-await, expressjs
- source code
https://stackoverflow.com/questions/51391080/handling-errors-in-express-async-middleware
The easy way, is to add try/catch
inside your middleware, and call next(err)
.
...
- tags: expressjs, error-handling, async-await
https://www.coreycleary.me/why-should-you-separate-controllers-from-services-in-node-rest-apis/
This is a follow-up to my last post, [What is the difference between Controllers and Services in Node REST API’s?](https://www.coreycleary.me/what-is-the-difference-between-controllers-and-services-in...
- tags: node.js, expressjs, software-architecture
https://thecodebarbarian.com/80-20-guide-to-express-error-handling
Express' error handling middleware is a powerful tool for consolidating your HTTP error response logic. Odds are, if you've written Express code yo...
- 📆 published on: 2017-08-04
- tags: expressjs, node.js, error-handling, async-await
https://expressjs.com/en/advanced/healthcheck-graceful-shutdown.html
Graceful shutdown When you deploy a new version of your application, you must replace the previous version. The process manager you’re using will first send a SIGTERM signal to the application to...
- tags: node.js, expressjs, healthcheck
https://github.com/koajs/koa/blob/master/docs/koa-vs-express.md
Philosophically, Koa aims to "fix and replace node", whereas Express "augments node". Koa uses promises and async functions to rid apps of callback hell and simplify error handling. It exposes its...
https://www.youtube.com/watch?v=CnailTcJV_U
In this video we talk about Bob Martin's Clean Architecture model and I will show you how we can apply it to a Microservice built in node.js with MongoDB and...
- 📆 published on: 2019-04-22
- tags: node.js, clean-code, expressjs, mongodb
- source code
https://github.com/erikras/react-redux-universal-hot-example
A starter boilerplate for a universal webapp using express, react, redux, webpack, and react-transform - erikras/react-redux-universal-hot-example
- tags: reactjs, webpack, redux, expressjs
- source code
https://github.com/auth0/express-jwt
connect/express middleware that validates a JsonWebToken (JWT) and set the req.user with the attributes - auth0/express-jwt
- tags: expressjs, node.js, jwt
- source code
https://auth0.com/blog/react-tutorial-building-and-securing-your-first-app/
Introduction to React and its components and routers. Tutorial of how to build a simple Q&A React app - secure backend API with Node.js and Express.
- 📆 published on: 2018-08-28
- tags: reactjs, react-router, node.js, expressjs, axios, authentication, security
- source code
https://medium.com/codingthesmartway-com-blog/creating-a-graphql-server-with-node-js-and-express-f6d...
In this tutorial you’ll learn how to setup a GraphQL server with Node.js and Express. We’ll be using the Express middleware express-graphql
in our example. Furthermore you’ll learn how to use GraphQ...
https://blog.dev-area.net/2017/01/17/from-rest-to-graphql/
To try out GraphQL I am going to use the Hyperwallet REST V3 APIs and expose them via a GraphQL Server. This includes querying as well as updating data.
- 📆 published on: 2017-01-17
- tags: graphql, rest, expressjs
- source code
https://engineering.invisionapp.com/post/express-integration-testing-supertest/
Put down that REST Client (or, gasp, the browser!) you’re using to test that API you’re developing and back away slowly! There’s a better way! With SuperTest there’s no need to verify your API by hand...
- 📆 published on: 2016-06-27
- tags: expressjs, integration-testing, supertest, chai
- source code
https://express-validator.github.io
An express.js middleware for validator.js.
- tags: expressjs, javascript
- source code
https://expressjs.com/en/guide/routing.html
Routing refers to how an application’s endpoints (URIs) respond to client requests.
- app routes,
express.Router
and more
- tags: expressjs
https://github.com/prettymuchbryce/node-http-status
Constants enumerating the HTTP status codes. All status codes defined in RFC1945 (HTTP/1.0, RFC2616 (HTTP/1.1), and RFC2518 (WebDAV) are supported. - prettymuchbryce/node-http-status
- tags: node.js, javascript, expressjs
- source code
https://medium.com/@xoor/dockerizing-a-node-js-and-mongodb-app-f9d80fdb280e
Docker has become an extremely popular tool not only among DevOps and Infrastructure people, but also for the daily work of any developer. Simple with examples for beginners.
- 📆 published on: 2017-10-22
- tags: docker, mongodb, node.js, expressjs, docker-compose
- source code
https://medium.com/crowdbotics/deploy-a-mern-stack-app-on-heroku-b0c255744a70
In this article, I will describe how to take an existing Web Application that is build using MongoDB, ExpressJS, Node.js, and React (often called as MERN stack) on a deployment service like Heroku
https://github.com/awslabs/aws-serverless-express
Run serverless applications and REST APIs using your existing Node.js application framework, on top of AWS Lambda and Amazon API Gateway
- tags: aws, node.js, expressjs, rest
- source code
https://www.sohamkamani.com/blog/2018/05/30/understanding-how-expressjs-works/
If you’ve worked on web application development in node, it’s likely you’ve heard of express.js . Express is one of the most popular…
- 📆 published on: 2018-05-30
- tags: expressjs
https://github.com/diegohaz/rest
RESTful API generator using NodeJS, Express and Mongoose
https://stackoverflow.com/questions/19917401/error-request-entity-too-large
Solution:
- tags: expressjs, javascript
https://thecodebarbarian.com/sending-web-push-notifications-from-node-js.html
Using service workers, you can send push notifications to Chrome straight from your Node.js app. The excellent web-push
[npm mo...
- 📆 published on: 2018-05-08
- tags: node.js, web-push, pushi-api, expressjs
- source code
https://www.youtube.com/watch?v=XqbBv1i9Yhc
This video covers writing a RESTful JSON API using Node, Express, MongoDB, Mongoose, and TypeScript. My other Node...
- 📆 published on: 2017-07-03
- tags: node.js, expressjs, mongodb, mongoose, typescript
- source code
https://blog.cloudboost.io/adding-swagger-to-existing-node-js-project-92a6624b855b
Today, almost every application has to be connected and to share data with other applications. The best way to do that is through APIs. For a long time there hasn’t been any industry standard for…
- 📆 published on: 2017-09-22
- tags: swagger, node.js, expressjs
- source code
https://www.npmjs.com/package/swagger-ui-express
Adds middleware to your express app to serve the Swagger UI bound to your Swagger document. This acts as living documentation for your API hosted from within your ap
- tags: swagger, node.js, expressjs, openapi
- source code
https://www.npmjs.com/package/body-parser
Node.js body parsing middleware
- tags: node.js, expressjs
- source code
http://blog.mgechev.com/2014/02/19/create-https-tls-ssl-application-with-express-nodejs/
Sometimes you want to test your application in environment closer to the real world. In such cases you might need to run it over TLS. Here are two simple steps, which can be used to achieve this resul...
https://expressjs.com/en/starter/generator.html
Use the application generator tool, express-generator
, to quickly create an application skeleton.
The express-generator package installs the express command-line tool. Use the following command to ...
- tags: expressjs
https://www.youtube.com/watch?v=UBGzsb2UkeY
Spend this 30 minutes learning how to adapt your existing ORM, SOA, or REST API to GraphQL so that you can begin to use GraphQL-based technologies like Relay.
- 📆 published on: 2016-04-25
- tags: graphql, ruby, python, expressjs
- source code
http://jilles.me/express-routing-the-beginners-guide/
- 📆 published on: 2014-10-16
- tags: expressjs
http://jilles.me/getting-the-express-app-js/
If you're like me and you start with something new, you want to know what every little piece does and means. This was the first problem I had with Express coming from just a basic JavaScript backgroun...
- 📆 published on: 2014-10-12
- tags: expressjs
"So you can require('./app')
from external files and get the express app that is not listening on any port (think unit tests and the like)."
Strongloop comparison with pm2 and Forever
- tags: expressjs, pm2, strongloop, forever
https://expressjs.com/en/advanced/pm.html
When you run Express apps for production, it is helpful to use a process manager to achieve the following tasks:
- Restart the app automatically if it crashes.
- Gain insights into runtime performanc...
- tags: expressjs, pm2, strongloop, forever, systemd
https://expressjs.com/en/advanced/best-practice-performance.html
This article discusses performance and reliability best practices for Express applications deployed to production.
This topic clearly falls into the “devops” world, spanning both traditional developm...
- tags: expressjs, devops, error-handling, async-await, pm2
http://www.hacksparrow.com/running-express-js-in-production-mode.html
How do you run Express in production mode? Do I need to edit a config file or something? Do I need to set some variables in app.js? What is the difference between development and production mode? Can ...