Coder Social home page Coder Social logo

jrello's Introduction

Easy Nodejs Setup

This project is a simple setup I want to have for other projects.

It contains the following:

  • frontend with live-reload and access to backend
  • styling with sass. also reloaded automatically
  • support for font-awesome and POC on images - including style references to images
  • auto-reload for backend with nodemon
  • js-standard linter
  • testing for both with mocha for backend and karma+jasmine for frontend
  • a build that packs minimized version of the project to tar.gz.
  • coverage reports for tests in frontend & backend

How to use

  • npm test - runs linter, frontend tests with coverage, backend tests with coverage
    write backend tests under tests/backend with suffix .spec.js
    write frontend tests under tests/frontend with suffix .spec.js
  • npm run build - annotates angular, minifies code and packs npm in dist folder
  • npm start - runs the project in development environment
  • npm server:dist - will run the project just like it would in production.

Using --silent on npm run commands

In some commands it is recommended to use --silent.
For example, running npm test might result in error.
npm has an annoying error print if it exists in none 0 exit code. read more

A simple solution is to run npm test --silent

Using no-color

Sometimes it is also recommended to use npm config set color false
Note, this will not always apply to the output coming from a script.

For example, if log4js is used, it will print with color

jrello's People

Contributors

guymograbi 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.