ExpressJS

Application and Data / Languages & Frameworks / Microframeworks (Backend)
Developer and Owner at Appurist Software

I'm building most projects using: Server: either Fastify (all projects going forward) or ExpressJS on Node.js (existing, previously) on the server side, and Client app: either Vuetify (currently) or Quasar Framework (going forward) on Vue.js with vuex on Electron for the UI to deliver both web-based and desktop applications for multiple platforms.

The direct support for Android and iOS in Quasar Framework will make it my go-to client UI platform for any new client-side or web work. On the server, I'll probably use Fastly for all my server work, unless I get into Go more in the future.

Update: The mobile support in Quasar is not a sufficiently compelling reason to move me from Vuetify. I have decided to stick with Vuetify for a UI for Vue, as it is richer in components and enables a really great-looking professional result. For mobile platforms, I will just use Cordova to wrap the Vue+Vuetify app for mobile, and Electron to wrap it for desktop platforms.

READ MORE
15 upvotes1 comment664.2K views
Paul Whittemore
Paul Whittemore
November 8th 2019 at 2:16AM

Update: The mobile support in Quasar is not a sufficiently compelling reason to move me from Vuetify. I have decided to stick with Vuetify for a UI for Vue, as it is richer in components and enables a really great-looking professional result. For mobile platforms, I will just use Cordova to wrap the Vue+Vuetify app for mobile, and Electron to wrap it for desktop platforms.

Reply
Engineering Manager at Taylor and Francis

We are in the process of building a modern content platform to deliver our content through various channels. We decided to go with Microservices architecture as we wanted scale. Microservice architecture style is an approach to developing an application as a suite of small independently deployable services built around specific business capabilities. You can gain modularity, extensive parallelism and cost-effective scaling by deploying services across many distributed servers. Microservices modularity facilitates independent updates/deployments, and helps to avoid single point of failure, which can help prevent large-scale outages. We also decided to use Event Driven Architecture pattern which is a popular distributed asynchronous architecture pattern used to produce highly scalable applications. The event-driven architecture is made up of highly decoupled, single-purpose event processing components that asynchronously receive and process events.

To build our #Backend capabilities we decided to use the following: 1. #Microservices - Java with Spring Boot , Node.js with ExpressJS and Python with Flask 2. #Eventsourcingframework - Amazon Kinesis , Amazon Kinesis Firehose , Amazon SNS , Amazon SQS, AWS Lambda 3. #Data - Amazon RDS , Amazon DynamoDB , Amazon S3 , MongoDB Atlas

To build #Webapps we decided to use Angular 2 with RxJS

#Devops - GitHub , Travis CI , Terraform , Docker , Serverless

READ MORE
14 upvotes1 comment1.8M views
Jon Senterfitt
Jon Senterfitt
January 29th 2021 at 7:07AM

But why not just use Contentful?

Reply
Needs advice
on
PostgreSQL
and
MongoDB

I need urgent advice from you all! I am making a web-based food ordering platform which includes 3 different ordering methods (Dine-in using QR code scanning + Take away + Home Delivery) and a table reservation system. We are using React for the front-end, and I need your advice if I should use NestJS or ExpressJS for the backend. And regarding the database, which database should I use, MongoDB or PostgreSQL? Which combination will be better? PS. We want to follow the microservice architecture as scalability, reliability, and usability are the most important Non Functional requirements. Expert advice is needed, please. A load of thanks in advance. Kind Regards, Miqdad

READ MORE
7 upvotes66.2K views
Replies (3)
Senior DevOps Engineer at Vital Beats

I can't speak for the NestJS vs ExpressJS discussion, but I can given a viewpoint on databases.

The main thing to consider around database choice, is what "shape" the data will be in, and the kind of read/write patterns you expect of that data. The blog example shows up so much for DBMS like MongoDB, because it showcases what NoSQL / document storage is very scalable and performant in: mostly isolated documents with a few views / ways to order them and filter them. In your case, I can imagine a number of "relations" already, which suggest a more traditional SQL solution would work well: You have restaurants, they have maybe a few menus (regular, gluten-free etc), with menu items in, which have different prices over time (25% discount on christmas food just after christmas, 50% off pizzas on wednesdays). Then there's a whole different set of "relations" for people ordering, like showing them past orders, which need to refer to the restaurant etc, and credit card transaction information for refunds etc. That to me suggests PostgreSQL, which will scale quite well if you database design is okay.

PostgreSQL also offers you some extensions, which are just amazing for your use-case. https://postgis.net/ for example will let you query for restaurants based on location, without the big cost that comes from constantly using something like Google Maps API to work out which restaurants are near to someone ordering. Partitioning and window functions will be great for your own use internally too, like answering questions of "What types of takeways perform the best for us, Italian, Mexican?" or in combination with PostGIS, answering questions like "What kind of takeways do we need to market to, to improve our selection?".

While these things can all be implemented in MongoDB, you tend to lose some of the convenience of ACID or have to deal with things like eventual consistency, which requires more thinking on the part of your engineers. PostgreSQL offers decent (if more complex) scalablity and redundancy solutions, and is honestly very well proven and plenty of documentation exists on optimising queries.

READ MORE
9 upvotes42.2K views
Founder at Odix
Recommends
MongoDB

Hello, i build microservice systems using Angular And Spring (Java) so i can't help with with ur back end choice, BUT, i definitely advice you to use a Nosql database, thus MongoDB of course or even Cassandra if your looking for extreme scalability with zero point of failure. Anyway, Nosql if much more faster then Sql (in your case Postresql DB). All you wanna do with sql can also be done by nosql (not the opposite of course).I also advice you to use docker containers + kubernetes to orchestrate them, if you need scalability and replication, that way your app can support auto scalability (in case ur users number goes high). Best of luck

READ MORE
3 upvotes34.8K views
View all (3)
Full Stack Web Developer
Needs advice
on
Node.js
NestJS
and
ExpressJS

I'm planning with a small team to create an application which is a platform for restaurants. I'm on the backend almost alone currently. I'm going to use Node.js for that, and I'm very fond of TypeScript, and I worked before mostly with ExpressJS. The team may get bigger as the application becomes bigger and more successful, so I have the Scalability concern in mind now, and I was considering these options: 1) Use Node+Express+Typescript 2) Use Node+NestJs (which utilizes Typescript by default)

Option 2 is enticing to me because recently I came to love NestJS and it provides more scalability for the project and uses Typescript in the best way and uses Express under the hood. Also I come from an Angular 2 background, which I think is the best frontend framework (my opinion, and I know React quite well), which makes Nest feel familiar to me because of the similarity between Nest and Angular. Option 1 on the other hand uses Express which is a minimalist framework, very popular one, but it doesn't provide the same scalability and brings decision fatigue about what to combine with it and may not utilize Typescript in the best way. Yet, on the other hand, it is flexible and it may be easier to manipulate things in different ways with it. Another very important thing is that it would be easier in my view to hire Node developers with skills in Express than NestJs. The majority of Node developers are much more familiar with JavaScript and Express.

What is your advice and why? I would love to hear especially from developers who worked on both Express and Nest

READ MORE
7 upvotes137.1K views
Replies (6)
Full Stack Engineer at RG Sistemas
Recommends
NestJS

I highly recommend NestJS because:

  • It's a framework you already like;
  • Typescript is growing fast, being increasingly adopted in the community;
  • All layers are well defined, not needing to think much about the organization;
  • Great documentation;
  • Nest CLI increases the development speed and keep the pattern;

Only using express and knowing that project can grow, you'ill need to define the structure well so that it doesn't get out of control.

READ MORE
9 upvotes89.7K views
Developer at Magrathea Labs
Recommends
NestJS

Hi Louai,

I am quite sure that you know the answer to your problem. And I am here to help you to follow your arrow. I have worked with the most popular Nodejs frameworks and I can sure you that there's no stack better than NestJS (at all). Typescript is the best thing that happened with Javascript, this is a fact. Ans NestJS make a such wonderful job using all the best Typescript tools. NestJS is the most mature and organized API manager. Its modular dependence injection, the use of DDD, the solid idea of single responsibility, it's unit a and e2e testing support, its documentation is the most incredible work in the world of Nodejs. You won't regret choosing this framework, even if your application grows a lot. If you follow the documentation tips you will be able to create an amazing and organized application.

ps: I am not part of the NestJS team, I am just a guy tired of wasting time with dumb and bad Frameworks and its bad documentations. I find relief in NestJS with all the time it's saved to me, it helped me to improve my job and let me create great things with Nodejs.

READ MORE
5 upvotes89.6K views
View all (6)
Shared insights
at
()

Repost

Overview: To put it simply, we plan to use the MERN stack to build our web application. MongoDB will be used as our primary database. We will use ExpressJS alongside Node.js to set up our API endpoints. Additionally, we plan to use React to build our SPA on the client side and use Redis on the server side as our primary caching solution. Initially, while working on the project, we plan to deploy our server and client both on Heroku . However, Heroku is very limited and we will need the benefits of an Infrastructure as a Service so we will use Amazon EC2 to later deploy our final version of the application.

Serverside: nodemon will allow us to automatically restart a running instance of our node app when files changes take place. We decided to use MongoDB because it is a non relational database which uses the Document Object Model. This allows a lot of flexibility as compared to a RDMS like SQL which requires a very structural model of data that does not change too much. Another strength of MongoDB is its ease in scalability. We will use Mongoose along side MongoDB to model our application data. Additionally, we will host our MongoDB cluster remotely on MongoDB Atlas. Bcrypt will be used to encrypt user passwords that will be stored in the DB. This is to avoid the risks of storing plain text passwords. Moreover, we will use Cloudinary to store images uploaded by the user. We will also use the Twilio SendGrid API to enable automated emails sent by our application. To protect private API endpoints, we will use JSON Web Token and Passport. Also, PayPal will be used as a payment gateway to accept payments from users.

Client Side: As mentioned earlier, we will use React to build our SPA. React uses a virtual DOM which is very efficient in rendering a page. Also React will allow us to reuse components. Furthermore, it is very popular and there is a large community that uses React so it can be helpful if we run into issues. We also plan to make a cross platform mobile application later and using React will allow us to reuse a lot of our code with React Native. Redux will be used to manage state. Redux works great with React and will help us manage a global state in the app and avoid the complications of each component having its own state. Additionally, we will use Bootstrap components and custom CSS to style our app.

Other: Git will be used for version control. During the later stages of our project, we will use Google Analytics to collect useful data regarding user interactions. Moreover, Slack will be our primary communication tool. Also, we will use Visual Studio Code as our primary code editor because it is very light weight and has a wide variety of extensions that will boost productivity. Postman will be used to interact with and debug our API endpoints.

READ MORE
18 upvotes2 comments334.6K views
John Akhilomen
John Akhilomen
April 1st 2020 at 3:00PM

I like the tech stack you guys have selected. You guys seem to have it all figured out, and well planned. Good luck!

Reply
Ne Labs
Ne Labs
March 9th 2020 at 12:34PM

RDBMS like Postgres can also store, index and query schemaless data as JSON fields, while also supporting relations where it makes sense. A document model is actually a downside, since usually data will still have relations, and it makes modeling them inconvenient.

Reply
Senior Fullstack Developer at QUANTUSflow Software GmbH

Our whole Node.js backend stack consists of the following tools:

  • Lerna as a tool for multi package and multi repository management
  • npm as package manager
  • NestJS as Node.js framework
  • TypeScript as programming language
  • ExpressJS as web server
  • Swagger UI for visualizing and interacting with the API鈥檚 resources
  • Postman as a tool for API development
  • TypeORM as object relational mapping layer
  • JSON Web Token for access token management

The main reason we have chosen Node.js over PHP is related to the following artifacts:

  • Made for the web and widely in use: Node.js is a software platform for developing server-side network services. Well-known projects that rely on Node.js include the blogging software Ghost, the project management tool Trello and the operating system WebOS. Node.js requires the JavaScript runtime environment V8, which was specially developed by Google for the popular Chrome browser. This guarantees a very resource-saving architecture, which qualifies Node.js especially for the operation of a web server. Ryan Dahl, the developer of Node.js, released the first stable version on May 27, 2009. He developed Node.js out of dissatisfaction with the possibilities that JavaScript offered at the time. The basic functionality of Node.js has been mapped with JavaScript since the first version, which can be expanded with a large number of different modules. The current package managers (npm or Yarn) for Node.js know more than 1,000,000 of these modules.
  • Fast server-side solutions: Node.js adopts the JavaScript "event-loop" to create non-blocking I/O applications that conveniently serve simultaneous events. With the standard available asynchronous processing within JavaScript/TypeScript, highly scalable, server-side solutions can be realized. The efficient use of the CPU and the RAM is maximized and more simultaneous requests can be processed than with conventional multi-thread servers.
  • A language along the entire stack: Widely used frameworks such as React or AngularJS or Vue.js, which we prefer, are written in JavaScript/TypeScript. If Node.js is now used on the server side, you can use all the advantages of a uniform script language throughout the entire application development. The same language in the back- and frontend simplifies the maintenance of the application and also the coordination within the development team.
  • Flexibility: Node.js sets very few strict dependencies, rules and guidelines and thus grants a high degree of flexibility in application development. There are no strict conventions so that the appropriate architecture, design structures, modules and features can be freely selected for the development.
READ MORE
24 upvotes1.7M views
Needs advice
on
React
ExpressJS
and
Django

Hello, I'm not a developer yet I'm creating a startup and I need someone to develop an app that works best using Python. I'm wondering whether it would be good to use React for the frontend and Django for the backend, noting that it will include an ecommerce solution. Would a combination of React and ExpressJS provide more flexibility/scalability? Or should I simply use React Fullstack? How can I assess this to be able to define the developer or developers skills needed?

Thank you for any help :) Jessie

READ MORE
6 upvotes8.3K views
Replies (4)
Founder / Developer at Ma'han Solutions Uganda Limited
Recommends
React
Django

I recommend using django for your backend / API because it will make it easier to develop and deploy faster.Then using react for the frontend for flexibility in your front end execution. You can go ahead and do some research and see how best to accomplish this. Check out this course that focuses on MERN stack (Mongodb, Expressjs, React, Nodejs) . https://dev.to/basir/react-ecommerce-project-2021-in-9-hours-21n7

READ MORE
10 upvotes2 comments7.2K views
Jomai Omar
Jomai Omar
May 26th 2021 at 3:19PM

I recommend using Django + React to make E-commerce.

Check this repository this is an opensource E-commerce using both react and Django:

https://github.com/mirumee/saleor

Reply
Jessie Helou
Jessie Helou
May 25th 2021 at 7:47PM

Thank you Paul! I will definitely try to complete the course, it will surely set me more on track 馃槉

Reply
CEO at Curious Packet
Recommends
React

React will be a perfect fit for ecommerce.

READ MORE
3 upvotes4 comments7.3K views
Damian Esteban
Damian Esteban
May 24th 2021 at 8:03PM

Next.js has recently announced some new e-commerce features:

https://nextjs.org/commerce

Reply
Jessie Helou
Jessie Helou
May 25th 2021 at 7:44PM

Thank you Damian, will read more about nextjs 馃槉

Reply
Jessie Helou
Jessie Helou
May 24th 2021 at 2:32PM

Thank you!

Reply
anas mattar
anas mattar
June 11th 2021 at 6:55PM

I prefer using Next.js for build a ecommerce website if your website is medium size but if your website is big size I prefer use magento 2 for this case.

Reply
View all (4)
Needs advice
on
Socket.IO
Firebase
and
Apollo

We are starting to work on a web-based platform aiming to connect artists (clients) and professional freelancers (service providers). In-app, timeline-based, real-time communication between users (& storing it), file transfers, and push notifications are essential core features. We are considering using Node.js, ExpressJS, React, MongoDB stack with Socket.IO & Apollo, or maybe using Real-Time Database and functionalities of Firebase.

READ MORE
9 upvotes545.8K views
Replies (3)
Junior Full Stack Developer at Freelance
Recommends
Firebase

I would recommend looking hard into Firebase for this project, especially if you do not have dedicated full-stack or backend members on your team.

The real time database, as you mentioned, is a great option, but I would also look into Firestore. Similar to RTDB, it adds more functions and some cool methods as well. Also, another great thing about Firebase is you have easy access to storage and dead simple auth as well.

Node.js Express MongoDB Socket.IO and Apollo are great technologies as well, and may be the better option if you do not wish to cede as much control to third parties in your application.

Overall, I say if you wish to focus more time developing your React application instead of other parts of your stack, Firebase is a great way to do that.

READ MORE
7 upvotes2 comments185.9K views
Ajay M
Ajay M
July 21st 2020 at 8:53PM

I totally agree with you.

The only issue is most features of firebase are paid (and from my perspective costly) which could be a concern when the app grows and they might need to migrate which would be a lot of work.

But if it's only a prototyping then it's all good.

Reply
Timothy Malstead
Timothy Malstead
July 21st 2020 at 10:07PM

I hear you. I honestly haven't looked into hosting costs of Firebase vs Express/Mongo much.

Reply
View all (3)
Needs advice
on
React
PostgreSQL
and
ExpressJS

We're a non-profit looking to rebuild our system.

Hey everyone - this seems like a little bigger project then I've seen on here! I tried to give a concise description of the project. We haven't started, but this is the general idea for our tech stack and what we're planning!

Description:

  • We handle all sorts of features within the medical supply chain, from country-wide warehouses to front-line health facilities.
  • We are in around 30 developing countries, and it would be essential to migrate our clients, who currently have their 4D relational databases, to our new system.

Our current system has:

  • A single central server, with many clients/servers scattered throughout a country. Client servers are in hospitals, pharmacies, health centers, small regional warehouses. The main server is in a country's main warehouse.
  • Countries are independent and run their own system.
  • Countries operate on what can only be described as .. extremely poor internet (assume 56k modem in the middle of the Amazon)
  • Our system is a transactional system run all through the same 4D database, which has a lot of extra features:
    • Allows clients to create orders to other members of the system - i.e., hospital->warehouse.
    • Allows dispensing medicines to patients.
    • Allows managing where stock is in a facility.
    • Manage expiry dates, stocktakes, inventory adjustments
    • Reporting on stock movements through the single 4D database

Main requirements are:

  • Extensibility. Due to being in so many countries and expanding, we have a lot of customizations. We'd most likely be wanting to look into some sort of plugin system.
  • Eventual consistency & availability. Due to operating in developing countries, we use offline-first filtered replication throughout the system and require each of the client servers to have (close to!) 100% availability of data, regardless of their network connection. We need eventual consistency in the main server so that we can report country-wide.
  • Scalability. We don't need to scale to massive amounts. Our maximum capacity looks to be a country around 200 million. That's about.. 1000 million records every year syncing into the main server.

Current thoughts: We're currently looking to run a PostgreSQL instance on each of the client servers. Each client server running an ExpressJS server. React as a front end. We are looking to roll our own sync system through most likely -a RESTful API.

This is a pretty vague and small description. I was wondering if anyone had any thoughts on a tech stack?

READ MORE
4 upvotes18.6K views
Replies (4)
Recommends
PostgreSQL

I think your choice of technologies are fine, but it you are starting new development I think your choice of architecture is most important. You can implement the desired architecture with many different technologies. Separating the layers of the application is important to allow each technology to be replaced or evolve independently. For example, I would write the code in a way that I could replace PostgreSQL with a different DBMS fairly easily in case a better alternative came along. The same goes for the React front end. If you have a good REST API you could replace the React front any with any framework, you could easily allow different locations to use Angular, Vue, or other front end technologies as long as the REST API is not designed to specifically target the React front end. I think the architecture of the code behind the REST layer, that would run in Express (the tool/language you are considering) is the decision that you will be stuck with for the longest time and that all other aspects of the application need to work around; so you want to get that architecture right. I think you should consider CQRS and Event Sourcing. https://docs.microsoft.com/en-us/azure/architecture/patterns/event-sourcing https://dzone.com/articles/cqrs-and-event-sourcing-intro-for-developers

READ MORE
8 upvotes13.2K views
Recommends
React

IMO this is the wrong way to go about solving such a problem. If your current system is complex you need to find a way to migrate from it to something that works better. Rather than choose tools, figure out how to make the transition without breaking everything in the process. Starting over from scratch is almost always a bad idea. The design comes first. The tools come later. Perhaps take simple a piece of the system to modify without really changing any functionality. It's hard to provide better advice without understanding the details of your system.

READ MORE
4 upvotes8.1K views
View all (4)
Full Stack Developer
Needs advice
on
Ionic
Electron
and
Angular 2
in

I'm currently doing some research to build a full cross-platform system that our personnel will use for various management and selling purposes, this is just a first step to migrate (and clean, lots of cleaning) a gigantic and obsolete system made in Java 7 with a nightmarish coupling between logic and view layers.

Since the system itself is considerably large, we are currently migrating the essential modules of its logic to an ExpressJS driven Restful API.

As a complementary project, I must find a way to share the highest possible amount of view code while achieving said cross-platform capacity.

My approach is the following:

  • Angular 7+ and Ionic 5 for Android and iOS.
  • Angular 7+ for the web.
  • Angular 7+ and Electron for Desktop.

While Angular is the common part, and considering that Ionic can work on any platform, i'm wondering what is the best way to achieve a non-conflicting integration of Electron.js to the very-commonly-used Angular+Ionic Stack for both Mobile and Web development?

I've stumbled with a quite good template build called Polyonic but I would love to hear more about the matter before taking such a long-lasting decision.

READ MORE
(twitter.com)
9 upvotes26.2K views
Replies (1)
Recommends
Ionic
Angular 2

Hello Fernando, I think that most of your approach is correct but maybe you're forgetting that an Ionic and Angular (together or not) could be a PWA that solves your desktop problem. With a PWA you only have to build a mobile and web solution and remember that you can build a library of components shared between Angular and Ionic. I hope this helps.

READ MORE
5 upvotes2 comments6.1K views
Fernando Albertengo
Fernando Albertengo
September 24th 2020 at 7:37PM

Oh yes, absolutely, with your PWA approach i even get a simpler distribution process. In that case, the only question that remains is if i will have the same level of access to the host. (i do have to connect to some periferials)

Thank you very much!

Reply
monikaja47
monikaja47
September 25th 2020 at 9:25AM

Hi again,

here you have a good resume of PWA characteristics:

https://www.altexsoft.com/blog/engineering/progressive-web-apps/

If you need to use some native functionalities is possible PWA does not fit your necessities but I think it worths it to take a look.

Reply