Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:
sysctl -a | grep machdep.cpu.features | grep VMX
If there's output, you're good!
| # Version key/value should be on his own line | |
| PACKAGE_VERSION=$(cat package.json \ | |
| | grep version \ | |
| | head -1 \ | |
| | awk -F: '{ print $2 }' \ | |
| | sed 's/[",]//g') | |
| echo $PACKAGE_VERSION |
| var express = require('express') | |
| , jwtMiddleware = require('express-jwt') | |
| , bodyParser = require('body-parser') | |
| , cookieParser = require('cookie-parser') | |
| , cors = require('cors'); | |
| // We pass a secret token into the NodeJS process via an environment variable. | |
| // We will use this token to sign cookies and JWTs | |
| var SECRET_TOKEN = process.env.SECRET_TOKEN; |
To setup your computer to work with *.dev domains, e.g. project.dev, awesome.dev and so on, without having to add to your hosts file each time.
| function useSelectors(reducer, mapStateToSelectors) { | |
| const [state] = reducer; | |
| const selectors = useMemo(() => mapStateToSelectors(state), [state]); | |
| return selectors; | |
| } | |
| function useActions(reducer, mapDispatchToActions) { | |
| const [, dispatch] = reducer; | |
| const actions = useMemo(() => mapDispatchToActions(dispatch), [dispatch]); | |
| return actions; |
| export default function createCrudHooks({ | |
| baseKey, | |
| indexFn, | |
| singleFn, | |
| createFn, | |
| updateFn, | |
| deleteFn, | |
| }) { | |
| const useIndex = (config) => useQuery([baseKey], indexFn, config) | |
| const useSingle = (id, config) => |