Skip to content

axelbkv/oving7dritt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example standalone Angular client application hosted by a Node.js server

Prerequisites

install Node.js, npm and git.

Clone repository

git clone https://github.com/ntnu-tdat2004/angular-standalone-client
cd angular-standalone-client

Install dependencies

  • Install global npm packages:

    npm install -g nodemon webpack

    If you receive an error, try add sudo before the above command.

  • Install JavaScript dependencies (settings file: package.json):

    cd client
    npm install
    cd ../server
    npm install
    cd ..

Build and run

  • Open a second terminal in the same directory

  • Build the client sources to dist/bundle.js to reduce the download size and enable the newest JS standard:

    # In terminal 1
    cd client
    webpack --watch

    dist/bundle.js is automatically updated when the client source files are altered.

  • Run node server with newest JS standard (harmony) enabled:

    # In terminal 2
    cd server
    nodemon --harmony server.js

    nodemon ensures that the server restarts when the source files have been changed.

  • Open http://localhost:3000

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published