Coder Social home page Coder Social logo

express-ssr-app's Introduction

Table of Contents

Short Description

The objective of the project is to create a basic Express backend with server-side rendering (SSR).

Project Dependencies

Development and production dependencies:

  "devDependencies": {
    "babel-preset-env": "^1.6.1",
    "babel-register": "^6.26.0",
    "chai": "^4.1.2",
    "cheerio": "^1.0.0-rc.2",
    "got": "^8.3.0",
    "mocha": "^5.0.4",
    "morgan": "^1.9.0",
    "nodemon": "^1.14.12"
  },
  "dependencies": {
    "babel-cli": "^6.26.0",
    "body-parser": "^1.18.2",
    "express": "^4.16.2",
    "mongoose": "^5.0.3",
    "pug": "^2.0.1"
  }

Testing

npm i --save-dev got chai cheerio mocha

Project Structure

express-ssr-app
    |- node_modules
        ...
    |- src
        |- public
            bootstrap.min.css
            custom.css
            sticky-footer.css
        |- routes
            home.js
            units.js
            user.js
        |- views
            |- includes
                footer.pug
                head.pug
                header.pug
            404.pug
            home.pug
            temario.pug
            user.pug
        index.js
        router.js
    |- tests
        home.spec.js
        user.spec.js
    .babelrc
    .gitignore
    nodemon.json
    package-lock.json
    package.json
    README.md

Available Scripts

In the project directory, you can run:

npm run start

Runs the app in the development mode. Open http://localhost:9000 to view it in the browser.

npm run watch

Runs the app with nodemon. Nodemon is a utility that will monitor for any changes in your source and automatically restart your server. Perfect for development.

npm run test

Note that the development server must be stopped to run the tests.

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.