GithubHelp home page GithubHelp logo

dviros / assyrian_dictionary_web Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sogwiz/assyrian_dictionary_web

0.0 0.0 0.0 25.73 MB

sargonsays English to Assyrian dictionary front end web app

License: MIT License

Shell 0.04% JavaScript 88.05% HTML 2.29% Dockerfile 0.54% EJS 1.96% Less 7.13%

assyrian_dictionary_web's Introduction

Sargonsays English to Assyrian Dictionary web frontend

English to Assyrian dictionary sargonsays.com , frontend made with ReactJS and API with Express. To run this app locally, it is highly recommended to use the Docker Compose approach as new dependencies like redis have been added.

Setup

Docker Compose

This will stand up a local development environment with a seeded database and frontend code. App will be running on localhost:80

docker-compose -f docker-compose-dev.yaml up --build --scale web=2

Docker

To run via docker. In this example, you'll be able to open a local web browser to localhost:80

docker run --restart always -e DB_CONN_STRING='DB_CONN_STR' -e REACT_PARSE_APP_ID=REACT_PARSE_ID -e REACT_PARSE_JS_KEY=REACT_PARSE_JS_KEY -e REACT_PARSE_SERVER=https://assyrian-433.nodechef.com/parse -p 80:3001 -d sogwiz/sargonsays 

Docker example via env file

docker run --env-file ./.env -p 80:3001 -d sogwiz/sargonsays

Docker example via Azure Container Instances ACI See azure/README.md

Via NPM

Install npm project dependencies

npm install

Create .env file with the following variables or set an environment variable

DB_CONN_STRING=mongodb://{user}:{psswd}@{host}:{port}/assyrian?ssl=true

REACT_PARSE_APP_ID={app_id}

REACT_PARSE_JS_KEY={js_key}

Run locally

npm run start

It will setup a server with live reload on localhost:3000. Live reloading is for both javascript and styles.

Build the code

npm run build

This code will bundle both javascript and styles to dist/ folder, generating an index.html which will point to a bundle.js and bundle.css.

What's inside ?

data

we need to reference the objectid by creating a new field that only has the id string and then doing dblookup this will need us to modify many scripts

  • data gen script (or maybe we just have a cloud function do this?)
  • the seeded db data also needs this change

CID=docker ps | grep node | awk '{ print $1 }' && docker exec -it $CID /bin/bash

fluentd

  • to build the fluentd container that sends logs to elasticsearch
docker build -f Dockerfile_fluentd -t sogwiz/sargonsays-custom-fluentd ./
docker push sogwiz/sargonsays-custom-fluentd
  • to run the fluentd container, run the following command:
docker run --rm -d --name custom-docker-fluent-logger -v $(pwd):/fluentd/log sogwiz/sargonsays-custom-fluentd -c /fluentd/log/fluentd.conf

redis

docker exec -it container-name redis-cli FLUSHALL

assyrian_dictionary_web's People

Contributors

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