Fire in its own way.
This is the backend repository for the Offprint fiction website.
It's still very much a work in progress.
| Dragonfish | Build | Test | Production |
|---|---|---|---|
| Server | |||
| Client |
You must have the following tools installed on your system or in a docker container (use listed versions or latest):
- NodeJS 14.17.0
- Yarn 1.22.10 (don't use 2.x)
- MongoDB Community Server 4.2.1
- MongoDB Compass is recommended
- Redis server 6.2.6
For these, use the command yarn global add @angular/cli @nestjs/cli nx:
- The Angular CLI 12.1.1 or higher (globally, via Yarn)
- The NestJS CLI 8.0.1 or higher (globally, via Yarn)
- The
nxCLI (globally, via Yarn)
Once you've installed and verified that these dependencies are working as expected...
- Create a file named
.envat the root of the repository - Copy the contents of
sample.envto your new.env - Edit
.envto setMONGO_URL=mongodb://localhost:27017 - Edit
.envto set yourREDIS_*values - Edit
.envto setJWT_SECRETto an actual secret, such as a plain random string - If you intend to test out image functionality, fill in the
DIGITALOCEAN_SPACESvariables with your information - If you intend to test out email functionality, fill in the appropriate SendGrid API information
- Run
yarn installin the repository root to install all the dependencies.
When you're starting the development server with nx serve client, make sure to include a .env file in the root project directory. A sample.env file can be found in the root of this repository.
VS Code is the recommended editor.
Installing MongoDB should have resulted in a persistent MongoDB service running, which is necessary for the site.
Note that by default, the backend serves up the frontend, so in order to test the website, both of them must be running.
To run the backend:
nx serve apiTo run the frontend:
nx serve bettafishOn some machines, the frontend won't automatically pick up changes and rebuild. In that case, you can try this:
nx build bettafish --watch --poll=2000Then you should find the website at http://localhost:3333
Check out the Contribution guides in the wiki!
TODO: Flesh this section out.
For more information on deploying the server and client, and the project's infrastructure, take a look at deployment folder's readme.
Look no further. We have a Discord server!