Skip to content

Express.js server for handling redirects at drs-deploy.repohubdev.tk

License

Notifications You must be signed in to change notification settings

code-server-boilerplates/cdrs-deploy.repohubdev.tk

Repository files navigation

Server-side code for cdrs-deploy.repohubdev.tk

This is the canonical source code for the Code Server Deploy Express.js server, hosted on Divio.

Available endpoints

Development

You need Node.js atleast v12.x (we'll raise the requirement once the minimum required LTS version goes EOL 2 months after) but we recommend 14.x or higher. If Node.js is not installed, please install it through the Node Version Manager (use this one instead for Windows users unless going to use WSL 2 instead).

  1. Clone the nice repo.
git clone git+ssh://[email protected]/code-server-boilerplates/cdrs-deploy.repohubdev.tk.git ~/cdrs-deploy
cd ~/cdrs-deploy
  1. Install dependencies with Yarn
# we use Yarn to manage this chaotic server code
# if you installed Node.js as root, please add sudo or
# su if needed
npm i -g yarn

# now hit the road (some packages don't play well with
# Plug 'n Play, so we'll use the node-modules linker for
# meanwhile)
yarn install
  1. Start the development server.
# copy the dotenv template and edit
cp .env.example .env && nano .env

# now start the dev server (btw we use Nodemon)
yarn dev

# on another session, edit the server.js file to handle
# more slugs for redirection
# just remember, no tabs or we'll eject you into an black hole
# somehwere in Stellapent Galaxy (holy $#!t we added an
# Gildedguy Lore reference)
nano server.js

# and also from there, check if its up
curl http://localhost:${SERVER_PORT:8080}/heartbeat -i --verbose

# now have fun testing if things are fine
xdg-open http://localhost:${SERVER_PORT:8080}/heroku/example-project
  1. We format our server-side code using Prettier, so here are the cheat sheet to our workflow:
# run all of them
yarn lint

# or run one-by-one
yarn lint-check # check if we fucked up
yarn lint-ci # preview the formatted server code before saving	
yarn lint-format # hit the road
  1. Ready to lift off to other galaxies? Commit your work, push into your fork (or into your branch here if you have write access) and send an merge request to get it peer-reviewed.
# use Commitizen to make your live easier
yarn commit # it's same as doing yarn cz --signoff

# if you're Yoopia and want chaos, remember to follow
# AngularJS' conventional-commits format, found at
# https://rtapp.tk/conventional-commits-ref
git commit --signoff

# now publish your contributions
git push

Contributing

By contributing to this repo, you agree to both the Developer's Certificate of Origin and our Community Code of Conduct. You may optionally sign our unified DcO+CLA if needed. Your contributions is automagically licensed under the MIT License.

About

Express.js server for handling redirects at drs-deploy.repohubdev.tk

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published