Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| # ------------------------------------------------------------------------------ | |
| # FILE: ember.plugin.zsh | |
| # DESCRIPTION: oh-my-zsh ember plugin file. | |
| # AUTHOR: Will Meldon (wdmeldon@gmail.com) | |
| # VERSION: 0.0.1 | |
| # ------------------------------------------------------------------------------ | |
| # Based (heavily) on composer.plugin.zsh | |
| # | |
| # Ember basic command completion | |
| _ember_get_command_list () { |
| wifi.setmode(wifi.STATION) | |
| wifi.sta.config("creationix","noderocks") | |
| wifi.sta.connect() | |
| tmr.alarm(0, 1000, 1, function () | |
| local ip = wifi.sta.getip() | |
| if ip then | |
| tmr.stop(0) | |
| print(ip) | |
| dofile("websocket.lc") | |
| dofile("main.lc") |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| import axios from 'axios'; | |
| // You can use any cookie library or whatever | |
| // library to access your client storage. | |
| import cookie from 'cookie-machine'; | |
| axios.interceptors.request.use(function(config) { | |
| const token = cookie.get(__TOKEN_KEY__); | |
| if ( token != null ) { | |
| config.headers.Authorization = `Bearer ${token}`; |