Git Product home page Git Product logo

home-inventory's Introduction

Home Inventory

This project was generated with Angular CLI version 10.1.2.

Requirements

Setup

You can use Elastic search as a service, in which case you can skip step 2 & 3.

  1. Install requirements: npm install --dev
  2. Setup elastic search, in /etc/elasticsearch/elasticsearch.yml add:
cluster.initial_master_nodes: homenode
network.host: 0.0.0.0
http.cors.enabled : true
http.cors.allow-origin : "*"
http.cors.allow-methods : OPTIONS, HEAD, GET, POST, PUT, DELETE
path.repo: ["/invar/home-inventory"]
  1. Start elastic search sudo service elasticsearch start
  2. Run server: ng serve

Backup elasticsearch data

  1. Create database: mkdir /invar/home-inventory.
  2. Register Repository:
curl -XPUT localhost:9200/_snapshot/inventory \
      -H 'Content-Type: application/json'        \
      -d '{
    "type": "fs",
    "settings": {
        "location": "/invar/home-inventory",
        "compress": true
    }}'
  1. Create Backup:
# curl -XDELETE localhost:9200/_snapshot/inventory/inventory
curl -XPUT localhost:9200/_snapshot/inventory/inventory \
      -H 'Content-Type: application/json'               \
      -d '{
  "indices": "inventory*",
  "ignore_unavailable": true,
  "include_global_state": false,
  "partial": false
}'

Restore elasticsearch data

  1. Create Restore:
curl -XPOST localhost:9200/_snapshot/inventory/inventory/_restore \
      -H 'Content-Type: application/json'                         \
      -d '{
  "indices": "inventory*",
  "ignore_unavailable": true,
  "include_global_state": false,
  "partial": false
}'

Deploy

  1. Build: ng build --prod --base-href https://atb00ker.github.io/home-inventory/
  2. Deploy: npx angular-cli-ghpages --dir dist/home-inventory/

home-inventory's People

Contributors

atb00ker avatar

Stargazers

 avatar

Watchers

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