Code Monkey home page Code Monkey logo

example_client's Introduction

WANRING - This code base is intended for code reviews. It is not intended for production uses.

####### HOW TO RUN vutilo_client locally ########

  1. start elasticsearch -

./elasticsearch

  1. start apollo

cd vutilo_apollo npm start

  1. DO NOT set local environment variables MONGO_URL and MONGO_OPLOG_URL
  2. meteor --settings settings-dev-liang.json

5a) Add data through admin app

cd vutilo_admin meteor --settings settings-di-liang.json --port 3500

5b) Or import data from files mongoimport -h 127.0.0.1:3001 -d meteor -c items < items.json mongoimport -h 127.0.0.1:3001 -d meteor -c stores < stores.json mongoimport -h 127.0.0.1:3001 -d meteor -c prices < prices.json

############################################################################################################################################################################

ZoJab Angular2-Meteor-Base App - Client - Hyrbrid Cordoba App

Usage

Update settings-default.json file with appropriate information "keys, urls, etc."

meteor --settings settings-default.json --port 3000

To debug on server side:

meteor --settings settings-default.json --port 3000 debug

Please note: by default, settings are available on server only. Settings values that will be used in client code must go inside the "public" block of your settings.json and can be accessed via Meteor.settings.public.KEY_NAME See: http://stackoverflow.com/questions/15559743/meteor-client-side-settings

Run locally, test remotely from any device (HTTP and HTTPS)

Start the app locally as described above, and verify that you can access it via localhost.

Then, open a terminal window and create a tunnel using ngrok:

./ngrok http 3000

The output from this command will consist of 2 URLs that forward requests to your local server, over HTTP and HTTPS. Works even if your local box is behind a firewall.

Contents

This package contains:

  • TypeScript support and Angular 2 compilers for Meteor
  • Angular2-Meteor
  • Angular2 (core, common, compiler, platform)
  • Angular2 Material, SASS support
  • Apollo GraphQL client side (requires Apollo Server)
  • Testing framework with Mocha and Chai
  • Meteor packages:

    meteor list

  • NPM Packages:

    npm list

  • ....

Folder Structure

The folder structure is a mix between Angular 2 recommendation and Meteor recommendation.

Client

The client folder contains single TypeScript (.ts) file which is the main file (/client/app.component.ts), and bootstrap's the Angular 2 application.

The main component uses HTML template and SASS file.

The index.html file is the main HTML which loads the application by using the main component selector (<app>).

All the other client files are under client/imports and organized by the context of the components.

Server

The server folder contain single TypeScript (.ts) file which is the main file (/server/main.ts), and creates the main server instance, and the starts it.

All other server files should be located under /server/imports.

Common

Example for common files in our app, is the MongoDB collection we create - it located under /both and it can be imported from both client and server code.

private

Contents in private directory is only accessible to server code

public

Contents in public directory is accessible to client

Testing TODO - testing with Mocha in progress

The testing environment in this boilerplate based on Meteor recommendation, and uses Mocha as testing framework along with Chai for assertion.

There is a main test file that initialize Angular 2 tests library, it located under /client/init.test.ts.

All other test files are located near the component/service it tests, with the .test.ts extension.

To fixe @agm/core bug

Add following to package.json in agm/core: "main": "core.umd.js"

example_client's People

Contributors

cesargalindo avatar

Watchers

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