Skip to content

noahjahn/api.noahjahn.dev

Repository files navigation

api.noahjahn.dev

api.noahjahn.dev was made to track how many unique visitors come to noahjahn.dev, how often they access the site, where they are accessing it from, and their preference of dark/light mode.

Table Of Contents

  1. Quick Links
  2. Getting Started
  3. Docker
  4. Deployment

Quick Links

Getting Started

To run this code you'll need to

  • use a UNIX operation system
  • have Docker installed

Quick Start

Locally, using docker is the easiest and fastest way to get up and running. The docker-compose.yml file will start the following services for you:

  • Nodejs Alpine container mapped to port 8000
  • MongoDB mapped to port 27017

The local database credentials are set in the docker-compose.yml file:

  • Username: root
  • Password: Codingisfun
  1. Clone the repository and change directory into the cloned repo
git clone [email protected]:noahjahn/api.noahjahn.dev.git
cd api.noahjahn.dev
  1. Copy .env.example to .env, it includes local credentials for using the docker services
cp .env.example .env
  1. Start docker containers
docker-compose up
  1. Once complete, you can being developing in a live reloading environment provided by nodemon

Docker

Start the docker containers (bring them up)

docker-compose up

You can use the -d flag runs the containers in a detached state so you can continue to use your terminal, but you won't see console.log output from the application

Stop containers from an attached state

Ctrl + C

Then, you still need to bring containers down

Bring containers down

docker-compose down

Deployment

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published