summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md11
-rw-r--r--package.json5
-rw-r--r--server/app.controller.spec.ts12
-rw-r--r--tsconfig.build.json2
4 files changed, 20 insertions, 10 deletions
diff --git a/README.md b/README.md
index edb27da..51e5e25 100644
--- a/README.md
+++ b/README.md
@@ -23,6 +23,8 @@ $ npm install -g yarn
### .env
Create a file in the root called `.env` and copy the contents of `.env.example`
+In your new `.env` file update the values for each key as you would like
+
### Dependencies
To install the server dependencies run
```bash
@@ -43,11 +45,18 @@ $ createdb neststarterappdevelopment # creates a postgres database
Run the migrations
```bash
-yarn db:migrate
+$ yarn db:migrate
```
Migrations need to be run again everytime a new migration is created
+Run the seeds
+```bash
+$ yarn db:seed
+```
+
+This should create roles and your admin level user in your database.
+
### SSL
Create a ssl key and certificate and place them in the root directory
diff --git a/package.json b/package.json
index 8e26aa4..4713982 100644
--- a/package.json
+++ b/package.json
@@ -12,7 +12,7 @@
"db:migration:create": "cd server/database/migrations && typeorm migration:create -n ",
"db:migrate": "yarn db:start && yarn typeorm migration:run",
"db:migrate:undo": "yarn db:start && yarn typeorm migration:revert",
- "db:seed": "ts-node ./node_modules/typeorm-seeding/dist/cli.js seed -n cli_config.ts -r $(pwd)/server/database",
+ "db:seed": "yarn db:start && ts-node ./node_modules/typeorm-seeding/dist/cli.js seed -n cli_config.ts -r $(pwd)/server/database",
"prebuild": "rimraf dist",
"build": "nest build && yarn client:build",
"format": "prettier --write \"server/**/*.ts\" \"test/**/*.ts\"",
@@ -82,7 +82,8 @@
"json",
"ts"
],
- "rootDir": "server",
+ "moduleDirectories": ["node_modules", "./"],
+ "rootDir": "./server",
"testRegex": ".*\\.spec\\.ts$",
"transform": {
"^.+\\.(t|j)s$": "ts-jest"
diff --git a/server/app.controller.spec.ts b/server/app.controller.spec.ts
index c60632d..35a53c5 100644
--- a/server/app.controller.spec.ts
+++ b/server/app.controller.spec.ts
@@ -1,5 +1,5 @@
import { Test, TestingModule } from '@nestjs/testing';
-import { AppController } from './app.controller';
+import { AppController } from 'server/app.controller';
describe('AppController', () => {
let appController: AppController;
@@ -13,9 +13,9 @@ describe('AppController', () => {
appController = app.get<AppController>(AppController);
});
- // describe('root', () => {
- // it('should return "Hello World!"', () => {
- // expect(appController.getHello()).toBe('Hello World!');
- // });
- // });
+ describe('root', () => {
+ it('should return "Hello World!"', () => {
+ expect(appController.index()).toBe('Hello World!');
+ });
+ });
});
diff --git a/tsconfig.build.json b/tsconfig.build.json
index 64f86c6..51000ea 100644
--- a/tsconfig.build.json
+++ b/tsconfig.build.json
@@ -1,4 +1,4 @@
{
"extends": "./tsconfig.json",
- "exclude": ["node_modules", "test", "dist", "**/*spec.ts"]
+ "exclude": ["node_modules", "test", "dist", "**/*spec.ts", "client"]
}