NoDivide / astrum

A lightweight pattern library designed to be included with any web project.
http://astrum.nodividestudio.com
1.54k stars 98 forks source link

how to run astrum #140

Closed douglasdeodato closed 7 years ago

douglasdeodato commented 7 years ago

Hi guys,

it is any command line to run this app? I could not run the app after follow the steps getting started steps from the readme:

I tried open public/pattern-library/app/index.html

and the page just shows me that: Building pattern library...

gettingin my console:

XMLHttpRequest cannot load file:///home/dlima/LAB/astrum/public/pattern-library/data.json?cb=Fri%20Oct%2013%202017%2017:03:29%20GMT+0100%20(IST). Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https. (anonymous) @ vue-resource.min.js:7

Uncaught (in promise) ObjectallHeaders: ""data: ""headers: ƒ (t)ok: falserequest: {method: "GET", data: "", params: {…}, headers: {…}, xhr: null, …}status: 0statusText: ""proto: Object

NonPolynomial commented 7 years ago

hey @douglasdeodato, this is mostly an security feature of common browsers that no script can access files on the your file system. Try to run your project on a local server. If you just have static html pages you can use http-server or serve to run your project under http://localhost:<port>.

LukeMcGurdy commented 7 years ago

Alternatively, you can open the index.html file in Firefox.

Andy-set-studio commented 7 years ago

Hey @douglasdeodato,

The Astrum front-end app is a single page Vue app. It is recommended that you run it in a web server environment though, to avoid issues like you mention.

I'll close this off because @NonPolynomial and @LukeMcGurdy have done a great job of suggesting some approaches for you. Thank you, both 🙂