Skip to content

phaidra/nestify-base-app

 
 

Repository files navigation

Build & Deploy

nestify-base-app

is a nestjs based app template spinning up a JSON-Schema driven REST-Interface using express-restify-mongoose and equiping it with user- and authentication management as well as some endpoints for asset upload and management.

Setup (using the provided docker-compose)

The Repo comes with a ready to launch compose file - you only need to set up your environment variables.

# setup your envirmonment variables
cp dev.env.template dev.env

If you're running your own Mongodb-Instance just fill in the connection details, run like so

docker compose --env-file ./dev.env run nestify-base-app

To set up a database with docker-compose:

# run the mongodb container specified in the compose file
docker compose --env-file ./dev.env run nestify-mongodb
# enter the mongodb container and set up your database and user
docker exec -it <containerID> sh
#
# this does not work in 4.2.24-rc2
# mongosh --username <MONGO_ROOT_USER> --password <MONGO_ROOT_PASSWORD>
# just do
mongo
use <DATABASE_NAME>
db.createUser({user: "<DATABASE_USER>", pwd: "<DATABASE_PASSWORD>",  roles: ["readWrite"]})

then shutdown the db with Ctrl+C and run the app like so

docker compose --env-file ./dev.env up

Schema Definitions

The schema definitions are expected as json files in the folder provided via the SCHEMAS_DIR env variable. They are converted to mongoose schemas using mongoose-schema-jsonschema and need to be formatted accordingly.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 98.8%
  • Other 1.2%