This project is to test mikro-orm with remix using awilix for dependency injection. The project is not meant to be production ready but merely a POC using the remix tutorial as a demo.
Remix is in the process of developing middleware. Until this implemented this project uses the remix-express-vite-plugin to create a custom express server with middleware. The dependency injection container is injected into the route context using this middleware.
- run the following to install all your dependencies
npm install
- run to following to create the first migration
npm mikro-orm migration:create
- run the following to create the database and apply the migration
npm mikro-orm migration:up
- seed the database
npm mikro-orm seeder:run
From your terminal:
npm run dev
This starts your app in development mode, rebuilding assets on file changes.
First, build your app for production:
npm run build
Then run the app in production mode:
npm start
Now you'll need to pick a host to deploy it to.
If you're familiar with deploying node applications, the built-in Remix app server is production-ready.
Make sure to deploy the output of remix build
build/server
build/client