Available at notesapp.cloud (Served over HTTPS)
The back-end is written is NodeJS using express. MongoDB is used for the database. Notes are stored here. Express-session uses the database for session stores. The front end is build using HTML, CSS and Javascript. No view engine is used. TODO: Implement testing in mochanpm run dev
rum run tests
dotenv is used to load enviroment variables in the absence of Docker. MONGODB_CONNSTRING must be defined in a .env file or in your systems environment formatted as such:
mongodb://{mongoUSER}:{mongoPASSWORD}@{mongoIP}:{mongoPORT}
DBNAME is also necessary environment variable. This defines the name of the MongoDB database the app will connect to.
Example: mongodb://admin:password123@192.168.2.43:27017
docker build -t localbuild .
docker run -d -e MONGODB_CONNSTRING=mongodb://{mongoUSER}:{mongoPASSWORD}@{mongoIP}:{mongoPORT} -p 80:8080 docker.io/library/localbuild
docker run -d -e MONGODB_CONNSTRING=mongodb://{mongoUSER}:{mongoPASSWORD}@{mongoIP}:{mongoPORT} -e DBNAME="{dbname}" -p 80:8080 docker.io/library/localbuild
The webiste should be running at localhost
docker compose -f docker-compose-local.yml up -d
First push a build using docker build
docker buildx build --platform linux/amd64,linux/arm64 -t {dockerusername}/{appname}:{versionnumber} --push .
replace "image:joshuapeddle/notes-app:X.X" in docker-compose.yml with "image: {dockerusername}/{appname}:{versionnumber}" Then do the compose, pulling the remote build.
docker compose -f docker-compose.yml pull
docker compose -f docker-compose.yml up -d