Giter VIP home page Giter VIP logo

atlas.js-app's Introduction

Atlas.js app

General information

  • This project utilises ES2015 modules and class properties language features, therefore it needs Babel as a compiler
  • All tasks related to building/checking/testing the project are defined in makefile.
  • Some additional helper scripts are in the bin/ directory - check them out!

Getting started

The included makefile has everything it needs to build this project. Depending on what you selected to have included during the project scaffolding process, it includes the following targets:

  • make: Compile all JavaScript files using Babel, optionally also install Node.js modules if they are not installed yet
  • make compile: Compile all JavaScript files modified since last compilation
  • make lint: Lint all JavaScript files using ESLint (optional)
  • make test: Run the test suite using Mocha (optional)
  • make inspect: Run the test suite with the Chrome Inspector protocol enabled, pausing the process on first JavaScript line (optional)
  • make coverage: Generate code coverage report as LCOV and HTML (use open coverage/index.html to see the report) (optional)
  • make clean/distclean: Remove generated data (coverage reports etc.)/remove all compiled JavaScript files

Usage

This project uses the Atlas.js' CLI to start the app. You are not required to use it, but it makes a lot of things easier for you as it manages the following:

  • It handles terminating signals and stops your app gracefully
  • It starts the Atlas.js app for you using the recommended way
  • It attempts to gracefully stop the app even in case of unexpected errors

If you decide to not use the CLI you will have to add all of these things yourself. But why would you do that...? ๐Ÿค”

Starting the app

./bin/atlas start

Note: If you do not add any service which would keep the process running (ie. a web server) the app will terminate right away because it has nothing to do (the event loop is empty). This is how Node.js works and it has nothing to do with the CLI or Atlas.js or with your code.

Production deployments

When deploying to production, you should not use the ./bin/atlas script as it requires devDependencies. Instead, run the Atlas.js CLI directly:

./node_modules/.bin/atlas start

Configuration

There are several places to define your configuration:

  • src/config/index.mjs: The main configuration point for your app. This should represent the ideal state, ie. production.
  • src/config/env/*.mjs: You can define overrides based on current environment (NODE_ENV)
  • src/config/local.mjs: You can place configuration overrides specific to your machine/work preferences here. This file is git-ignored so it's safe to override absolutely anything here. This file is applied on top of the main and the environment-specific configuration options (it has the highest priority).
  • .env: The usual. Put there any environment variables you need to have when working locally. This file is only loaded if you start the process using .bin/atlas CLI or when running tests using the generated test suite.
  • local.mk: You can extend/enhance your workflow with custom Make targets or add flags to existing commands (see the makefile for reference). This file is git-ignored so your changes will not affect other developers' workflows.

Next steps

You should probably start adding some components! Check out those already available. If you cannot find what you need, you can implement it yourself. Always consider opening a pull request against Atlas.js repository to make your component available for everyone so that others do not have to create that same component themselves again. โค๏ธ

atlas.js-app's People

Contributors

nncl avatar

Watchers

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