First steps
Eicrud plugs itself on a working NestJS application (configured with Fastify). You'll need a database server (MongoDB or PostgreSQL) listening on the right port.
Install with the CLI (recommended)
It is recommended to use Eicrud's CLI throughout all your developments since it will maintain a proper directory structure.
First create your nest app as specified in the NestJS documentation.
Then use the CLI to setup your project.
Install with git
Alternatively, you can pull a ready app from the starter repository.
Post Installation
Eicrud needs a secret key to sign JWT tokens, which are used during authentication. You can generate a new one using the node:crypto
module.
.env
file at the root of your project.
You also need a local (or remote) database server to use Eicrud. Once you have it running, verify your connection. Check out Mikro-orm's configuration for more info.
// ...
MikroOrmModule.forRoot({
entities: [...CRUDEntities],
driver: MongoDriver,
dbName: "myapp-db",
}),
// ...