0.0.12 • Published 7 years ago

gaws v0.0.12

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

gaws

Easy to use dev content-server while developing UI. This is probably the worst possible acronym. But sometimes we need a server after the command create-react-app ... gaws = Give me a Web Server I can configure using package.json

Install

yarn add gaws -D

Setup your package.json

Edit your package.json like this to define routes, port and proxy:

{
  "name": "your-react-project-name",
  "version": "0.0.1",
  "private": true,
  "dependencies": {
    "react": "^15.5.4",
    "react-dom": "^15.5.4"
  },
  "devDependencies": {
    "gaws": "^0.0.6",
    "react-scripts": "0.9.5"
  },
  "scripts": {
    "start-server": "gaws",
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject"
  },
  "gaws" : {
    "port": 3001,
    "routes": [
      ["get", "/customers", "./mock/customers.json", "text/json"],
      ["post", "/customers", "./mock/new-customer.json", "text/json"],
      ["get", "/customers-legacy", "./mock/customers.xml", "text/xml"],
    ]
  },
  "scripts": {
    "start-server": "gaws"
  },
  "proxy": "http://localhost:3001/",
}
0.0.12

7 years ago

0.0.11

7 years ago

0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago