Fusty / MyMarket-UI-FORK

MyMarket UI Repository

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Installation

Clone the repositories into two separate directories git clone https://github.com/fusty/MyMarket

and

git clone https://github.com/fusty/MyMarket-UI

cd into the MyMarket server directory cd MyMarket

And create a .env file similar to this one (Tweak values for your own setup).

DEPLOY_UI_PATH=/your/path/to/MyMarket-UI/dist
HOST=localhost
PORT=3336
DEPLOY_UI_DEV_PORT=3335
NODE_ENV=development
APP_URL=http://${HOST}:${PORT}
CACHE_VIEWS=false
APP_KEY=CREATEANEWKEYIMMEDIATELY
DB_CONNECTION=sqlite
DB_HOST=127.0.0.1
DB_PORT=3306
DB_USER=USER
DB_PASSWORD=PASSWORD
DB_DATABASE=MyMarket
SESSION_DRIVER=cookie
HASH_DRIVER=bcrypt```

Ensure DEPLOY_UI_PATH points at the location you cloned the MyMarket-UI repository into (plus the /dist path)

Install all the dependencies
`npm i`

Install adonis-cli globally
`npm i -g @adonisjs/cli`

Generate a fresh key for this application (VERY IMPORTANT)
`adonis key:generate`

Now cd into the MyMarket-UI directory
`cd ../MyMarket-UI`

And install all the dependencies
`npm i`

You've now set up the application so it will run on port 3336 for production, and port 3335 (UI hot-reload server) and port 3336 (adonis server) for development.

# Running in Development Mode

From the MyMarket-UI directory simply run
`npm run dev`

This will launch a node server on port 3335 (to modify this change the port property in the dev object inside config/index.js.  Remember to make the corresponding change in the .env file for the MyMarket server) which enables hot-reloads of the pages whenever you change content in the UI directories.

In another terminal window, from the MyMarket server directory, simply run
`npm run dev`

This will launch another node server on port 3336 (This port can be modified in the .env file).

Visit `localhost:3336` to access the application

# Running in Production Mode

From the MyMarket-UI directory simply run
`npm run build`

This will generate all the static assets required by the frontend and put them into the `dist/` directory.

In another terminal window, from the MyMarket server directory, simply run
`npm run prod`.

This will launch a node server on port 3336, generate a `public/` directory symbolic link which will pull in the `dist/` directory from the MyMarket-UI repository.  Since the UI is all static files this is all that is required.  Ensure you have set the `DEPLOY_UI_PATH` properly in the `.env` file.  It should be an absolute path.  Also, remove the DEPLOY_UI_DEV_PORT line and change the `NODE_ENV` value to `production`.




**CoPilot** is a fully responsive admin template that is forked from [AdminLTE](https://almsaeedstudio.com). The difference here is that this repo is tailored to use with [Vue.js](https://vuejs.org). The UI is based on the [Bootstrap 3](https://github.com/twbs/bootstrap) framework. Highly customizable and easy to use. Fits many screen resolutions from small mobile devices to large desktops.

<a href="https://copilot.misterGF.io" target="_blank">✈️️ Take it for a spin.</a>


[![Build Status](https://travis-ci.org/misterGF/CoPilot.svg?branch=master)](https://travis-ci.org/misterGF/CoPilot)
[![Build status](https://ci.appveyor.com/api/projects/status/wenct56narbt6r1l?svg=true)](https://ci.appveyor.com/project/misterGF/copilot)

!["CoPilot Screenshot"](http://res.cloudinary.com/gatec21/image/upload/v1489954238/copilot-march-2017_ifdrlj.png)

In an attempt to keep the project clean I have not included every plugin/feature that AdminLTE offers. You simply need to add the plugin in the /static/js/plugin folder to include them or use npm. I've included the popular ones.

The structure of the app is scaffolded by [vue-cli](https://github.com/vuejs/vue-cli). Which is a simple CLI tool that setups our environment. CoPilot uses the webpack package. So we get a full-featured Webpack + vue-loader setup with hot reload, linting, testing & css extraction.

We leverage all the goodies that vue.js offers. Vue-Router for routing. Vue-Resource for AJAX calls. Vuex for state management. **This project is using VueJS 2.0!** Earlier versions can be found under the [vue 1.0 branch](https://github.com/misterGF/CoPilot/tree/vue1.0_version).

I also recommend that you install vue-devtools for Chrome so that you can easily inspect that state of vue.
![vue-devtools](http://res.cloudinary.com/gatec21/image/upload/v1461611064/copilot-vuetools_t1mvpg.png)

The data that is being pulled uses faker.js to make it dynamic. This is for demo purposes. Look for demo.* for information that is generated dynamically.

Installation
------------
Installing CoPilot is easy.

#### Download:

Download from Github

#### Using The Command Line:

git clone https://github.com/misterGF/CoPilot.git



#### Build Setup

``` bash
# install dependencies
sudo npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

# run unit tests
npm run unit

# run e2e tests
npm run e2e

# run all tests
npm test

For detailed explanation on how things work, checkout the guide and docs for vue-loader.

Documentation

Depending on the component you are working on you should have the following links handy.

Information and tips about CoPilot can be found in the wiki.

Browser Support

  • IE 9+
  • Firefox (latest)
  • Chrome (latest)
  • Safari (latest)
  • Opera (latest)

Contribution

Contribution are always welcome and recommended! Here is how:

  • Fork the repository (here is the guide).
  • Clone to your machine git clone https://github.com/YOUR_USERNAME/CoPilot.git
  • Make your changes
  • Create a pull request

TODOS

The purpose of this project is to provide a full example of how to leverage Vue. If you find anything that can be Vue-ified please send me a PR.

License

CoPilot is an open source project by Gil Ferreira that is licensed under MIT.

Image Credits

Pixeden

Graphicsfuel

Pickaface

Unsplash

Uifaces

About

MyMarket UI Repository


Languages

Language:HTML 74.9%Language:JavaScript 18.0%Language:CSS 4.7%Language:Vue 2.4%Language:PHP 0.1%