Skip to content
This repository was archived by the owner on Sep 25, 2025. It is now read-only.

chore: move all server code into separate dir - #684

Closed
ojeytonwilliams wants to merge 10 commits into
freeCodeCamp:mainfrom
ojeytonwilliams:chore/reorganise-dirs
Closed

ojeytonwilliams wants to merge 10 commits into
freeCodeCamp:mainfrom
ojeytonwilliams:chore/reorganise-dirs

Conversation

@ojeytonwilliams

Copy link
Copy Markdown
Contributor
  • chore: move db inside server
  • chore: move typeorm inside server
  • chore: move server deps into its package.json
  • chore: fix ts-node/ts-node-dev issues
  • chore: move tsconfig into server
  • fix: update docker config

@gitpod-io

gitpod-io Bot commented Aug 6, 2021

Copy link
Copy Markdown

@ojeytonwilliams
ojeytonwilliams marked this pull request as draft August 6, 2021 10:31
Unit tests inside the containers don't tell us much and don't work now
that the test packages are not included in the app container
@ojeytonwilliams

Copy link
Copy Markdown
Contributor Author

There's an argument for keeping the db dir in root, since it contains dev scripts and isn't technically part of the server. The rationale for moving it is that typeorm is part of the server and so it makes sense (and simplifies the config) if all the db-related things are in the same place.

@ojeytonwilliams
ojeytonwilliams marked this pull request as ready for review August 6, 2021 12:49
@ojeytonwilliams

Copy link
Copy Markdown
Contributor Author

The plan is to make one more change - pulling all the server source into a src directory to mirror the client. Then it should be straightforward to compile the TS files into a dest dir and use that for production. I think this PR does enough, though.

@allella

allella commented Aug 6, 2021

Copy link
Copy Markdown
Contributor

Above my pay-grade, but double checking the docs changes.

Is the following part of CONTRIBUTING.md impacted by these changes?

  • The server will automatically restart anytime you save a .ts or .js file within the server/ directory.

@ojeytonwilliams

Copy link
Copy Markdown
Contributor Author

@allella it shouldn't, but I have broken the Docker setup by moving things around. Since I don't use it myself, I'm likely to keep breaking it.

With that in mind, I'll add a parallel CI job to run the Cypress tests against a container. This is probably excessive, but it's an easy way to check it's working.

Comment thread .github/workflows/cypress-docker.yaml Resolved
@ojeytonwilliams

Copy link
Copy Markdown
Contributor Author

Closing in favour of #685

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants