Simple redirector tool. Integrated with Storyblok.
🏠 Homepage
- node 10.x
- npm 6.x
- @cloudflare/wrangler ^1.8
You must have configured @cloudflare/wrangler before proceeding.
Install local dependencies.
npm install
Copy .env.example
to a file for each environment you want to target (as described below) and fill it with the correct values.
development
DOTENV_CONFIG_PATH=.env ENVIRONMENT=development NODE_ENV=development
staging
DOTENV_CONFIG_PATH=.env.staging ENVIRONMENT=staging NODE_ENV=production
production
DOTENV_CONFIG_PATH=.env.production ENVIRONMENT=production NODE_ENV=production
Start local development server
npm run start
Synchronize redirections.json
with Storyblok space
npm run sync
Build the library
NOTE: you may want to run sync
before to sync the latest redirections
npm run build
Lint the code
npm run lint
Format the code
npm run format
Publish the worker to Cloudflare to a target environment. Without target env, default is development
.
npm run publish[:env]
npm run test
👤 vabatta
- Github: @vabatta
Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.
Give a ⭐️ if this project helped you!
Copyright © 2020 vabatta.
This project is Creative Commons Attribution No Derivatives 4.0 International licensed.
This README was generated with ❤️ by readme-md-generator