Initial commit

This commit is contained in:
2026-05-06 22:38:06 +12:00
commit 0342b5fb9d
54 changed files with 22513 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
import { MongoMemoryServer } from 'mongodb-memory-server';
const mongo = await MongoMemoryServer.create({
instance: {
port: 27017,
dbName: 'lean101',
ip: '127.0.0.1'
}
});
console.log(`MongoDB demo server running at ${mongo.getUri()}`);
console.log('Press Ctrl+C to stop it.');
const shutdown = async () => {
await mongo.stop();
process.exit(0);
};
process.on('SIGINT', shutdown);
process.on('SIGTERM', shutdown);