Giter Site home page Giter Site logo

gauravmehla / basic-express-website Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nishigaba/basic-express-website

0.0 1.0 0.0 1.87 MB

Basic Express Website with Multiple Pages, Template and a working Contact Form with Nodemailer.

JavaScript 46.43% CSS 1.17% HTML 52.39%

basic-express-website's Introduction

Basic-Express-Website

Basic Express Website with Multiple Pages, Template and a working Contact Form.

Things to Know Before Start

How to Setup Node_JS_Web_Server

Project Description and Features

  • Installing and Setting up Express
  • Routing System
  • Jade Templating
  • Working with Views

Project Sections

  • Installing and Setting up Express
  • Jade Template Setup
  • Page Routes and Views

Section 1 (Installing and Setting up Express)

Express JS

Express JS is a Third Party Module for Node JS,an Entire MVC Framework. We can define our own Routes and interact with our Databases.

Install Express JS through: npm install -g express

Install Express JS Generator for generating the framework folders and files for our application. npm install -g express-generator

Now, you can run the command express express-website Then run command npm Install in the Project Directory

This will create a project struture like this:

[-] bin 
[-] node_modules		
[-] public
[-] routes
[-] views
</> app.js
</> package.json

Section 2 (Jade Template Setup)

Jade

Default HTML Helper or Engine for Express with some different syntactical structure than standard HTML.There is no tags.

Now, we are going to require essential modules and routes and then eventually creating the instance of expressJS and then setting up view Engine (in our case it is Jade) and setting up error handling system in app.js

Now, run command npm start in your terminal.

Check views :

</> index.jade   (main content of Express Default Page)
</> layout.jade  (contains core HTML)
</> error.jade

Jade Template Setup is Done. Well Done โœจ

Section 3 (Page Routes and Views)

First of all, Install Nodemon Module to increase your Coding and Time Efficieny.

To know more about Nodemon ,visit these links:

In this Section, we are going to Setup Bootstrap Theme and updating the views by changing the content in layout.jade, index.jade in the views Directory.

We are going to add some new views and routes for About Us and Contact Us and then require them in our app.js file

Our Basic Express Website is Ready with Multiple Routes and a Working Contact Form.

How to run this Project:

  • Clone this repository by typing following command in your Terminal: git clone https://github.com/NishiGaba/Basic-Express-Website.git
  • Then run npm install in the Cloned Project Directory
  • In last, run nodemon ./bin/www command in your Terminal

Whoa ๐Ÿ˜„ Awesome Express Website is running in your Browser. Check it out.

License

MIT ยฉ Nishi Gaba

basic-express-website's People

Contributors

nishigaba avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.