How to create Express.js web application using Express Generator

The quickest way to get started with express application is to use Express Generator. Only pre-requisite is node.js should be installed to proceed further.
Step-1: Install exress-generator
m-c02z31rnlvdt:rap n0r0082$ npm install -g express-generator

Step-2: Create application using express-genrator.
Once express-generator is installed. Create express application 'client-app' using express-generator.
m-c02z31rnlvdt:rap n0r0082$ npx express-generator client-app

'client-app' skeleton is created with routes, views and placeholder for assets like images, css.
create : rap-client-app/
   create : client-app/public/
   create : client-app/public/javascripts/
   create : client-app/public/images/
   create : client-app/public/stylesheets/
   create : client-app/public/stylesheets/style.css
   create : client-app/routes/
   create : client-app/routes/index.js
   create : client-app/routes/users.js
   create : client-app/views/
   create : client-app/views/error.jade
   create : client-app/views/index.jade
   create : client-app/views/layout.jade
   create : client-app/app.js
   create : client-app/package.json
   create : client-app/bin/
   create : client-app/bin/www

Note
: 'client-app' app is ready and server can be started. Default port number associated with server is 3000. It can be modified in file 'rap-client-app/bin/www' at line# 15.

Step-3: Install dependencies Go to folder client-app and install dependencies.
m-c02z31rnlvdt:rap n0r0082$ cd client-app
m-c02z31rnlvdt:client-app n0r0082$ npx express-generator client-app

Step-4: Start server.
m-c02z31rnlvdt:rap n0r0082$ npm start 
> rap-client-app@0.0.0 start /Users/n0r0082/rap/client-app
> node ./bin/www

GET / 200 777.042 ms - 170
GET /stylesheets/style.css 200 9.007 ms - 111
GET /favicon.ico 404 16.686 ms - 1452

Step-4: Once server is started. clinet-app can be accessed via http://localhost:3300/

25 Comments

  1. I am impressed by the information that you have on this blog. It shows how well you understand this subject.
    data analytics course
    big data analytics malaysia
    big data course

    ReplyDelete
  2. Your work is very good and I appreciate you and hopping for some more informative posts
    data science course

    ReplyDelete
  3. Hi to everybody, here everyone is sharing such knowledge, so it’s fastidious to see this site, and I used to visit this blog daily PMP Certification
    PMP Course
    PMP Course in Malaysia
    PMP Training
    PMP Training in Malaysia

    ReplyDelete
  4. Awesome blog. I enjoyed reading your articles. This is truly a great read for me. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work!
    data analytics course
    big data analytics malaysia
    big data course

    ReplyDelete
  5. This is also a very good post which I really enjoyed reading. It is not every day that I have the possibility to see something like this..
    PMP Certification
    PMP Course in Malaysia
    PMP Course
    PMP Training in Malaysia
    PMP Training

    ReplyDelete
  6. Regular visits listed here are the easiest method to appreciate your energy, which is why why I am going to the website everyday, searching for new, interesting info. Many, thank you!data science course

    ReplyDelete
  7. great article!! sharing these type of articles is the nice one and i hope you will share an article on data science.By giving a institute like 360DigiTMG.it is one the best institute for doing certified coursesdata science course

    ReplyDelete
  8. Great blog!! I hope you're going to post an artificial intelligence blog.
    artificial intelligence course in noida

    ReplyDelete
  9. "
    I was just examining through the web looking for certain information and ran over your blog.It shows how well you understand this subject. Bookmarked this page, will return for extra."
    hrdf contribution

    ReplyDelete

  10. There is plainly a ton to consider this. Keep working, remarkable work!
    https://360digitmg.com/course/project-management-professional-pmp

    ReplyDelete
  11. Superb exertion to make this blog more awesome and appealing.
    hrdf claimable

    ReplyDelete
  12. Very nice article, I enjoyed reading your post, very nice share, I want to twit this to my followers. Thanks!.
    business analytics course

    ReplyDelete
  13. Keep it up for more valuable information like this. If you want professional website designing and SEO Services at an affordable price, please visit Ogen Infosystem and the best websites for your business.
    Top 5 Website Designing Company in India

    ReplyDelete
  14. Twitter Promotion is a great way to have this blog seen but if you have videos you can also buy tiktok views and more !

    ReplyDelete
  15. YouTube Promotion seems a great way to have your videos seen but you can also buy slow instagram likes as well for your photos to receive daily traffic.

    ReplyDelete
  16. Amazing blog.Thanks for sharing such excellent information with us. keep sharing...
    digital marketing training in aurangabad

    ReplyDelete
  17. There is obviously a lot to identify about this. I think you made certain good points in features also. ufabet1688

    ReplyDelete
  18. Your post is really good thanks for sharing these kind of post but if anyone looking for Best Consulting Firm for Fake Experience Certificate Providers in Delhi, India with Complete Documents So Dreamsoft Consultancy is the Best Place.Further Details Here- 9599119376 or Visit Website- https://experiencecertificates.com/experience-certificate-provider-in-delhi.html

    ReplyDelete
  19. Croydon taxi / Minicabs- call us on 02086862777 .We are comfortable,reliable and always safe,We give the most luxurious & comfortable taxi service in croydon .

    https://www.expresscouriercars.co.uk/

    ReplyDelete

  20. Are you looking for places to eat Indian food nearby? Here you can explore the best Indian restaurants and cuisines near your location.Order now.

    https://www.adeenaskitchen.co.uk/menu

    ReplyDelete
  21. Thanks for posting these kinds of post its very helpful and very good content a really appreciable post apart from that if anyone looking for best software testing training institute in delhi so,contact here +91-9311002620 visit https://www.htsindia.com/software-testing-training-courses

    ReplyDelete
  22. Infycle Technologies offers couples for care and technology in addition to Python Training in Chennai, 100% of the internship class will be prepared. After completing the training, the participants will be sent to the upper MNCs interviews. Call 750633333 to get more information and get a free display.

    ReplyDelete
  23. This comment has been removed by the author.

    ReplyDelete
Previous Post Next Post