fix(config): add IDX configuration
This commit is contained in:
parent
49efa7a6bf
commit
5af5fde8d0
1 changed files with 33 additions and 0 deletions
33
.idx/dev.nix
Normal file
33
.idx/dev.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{ pkgs, ... }: {
|
||||
channel = "stable-23.11";
|
||||
|
||||
packages = [
|
||||
pkgs.nodejs_20
|
||||
];
|
||||
|
||||
services.mongodb = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
idx = {
|
||||
extensions = [
|
||||
"mongodb.mongodb-vscode"
|
||||
];
|
||||
|
||||
workspace = {
|
||||
onCreate = {
|
||||
npm-install = "npm install";
|
||||
default.openFiles = [
|
||||
"server.js" "database.js" "README.md"
|
||||
];
|
||||
};
|
||||
onStart = {
|
||||
start-database = "mongod --port 27017 --fork --logpath ./.idx/database.log --dbpath ./.idx/.data";
|
||||
run-server = "node server.js";
|
||||
};
|
||||
};
|
||||
|
||||
previews = {
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue