gardenbuilder-backend's People
gardenbuilder-backend's Issues
Add Winston as a logger to project, replace console.log statements with logger.info or logger.error statements
We need to add Winston as a logger. Please:
- Install it into the project
- Set up a config file
- Set up a
logs
directory (at project root, outside of thesrc
folder) - Import it as
logger
into each file that uses aconsole.log
statement - Replace all instances of
console.log
withlogger.info
orlogger.error
depending on whether theconsole.log
is meant to log an error or some information - Check to ensure that a
logger.info
statement saves something to the log file in thelogs
directory
Bonus Points: Set up rotating logs, like a log for every day. There are a number of libraries that help with this on npm.
Create User resolver to expire/invalidate a token
Create User resolver to expire/invalidate a token.
From the front end (for the old API) this was called with
export const SIGNOUT_MUTATION = gql`
mutation SIGNOUT_MUTATION {
deleteToken {
deleted
}
deleteRefreshToken {
deleted
}
}
Add tests for Garden entity
Add tests for src/entities/Garden.ts
. You can use tests/entities/Bed.test.ts
as a model.
Add pull request and issue templates
Add pull request and issue templates. You can probably copy them from the other backend (python) repo or from gardenbuilder-frontend
Update TODO sections in README.md
Get project up and running on a local DB, then update the sections in README.md marked with TODO with instructions on how to do those things.
Add tests for authenticateUser mutation to User.test.js
Please add tests for the authenticateUser
mutation to User.test.js
. You can use the createUser
tests for a reference.
Add beds entity to project
Add beds entity to project, modeled after User and Garden entities.
Add code of conduct file
I would like to copy CODE_OF_CONDUCT.md from gardenbuilder-frontend into this repo. Please assign this issue to me.
Thanks.
Research and implement method for inserting multiple related entities at once
As an example, tests/resolvers/Garden.test.ts
creates an owner and then a garden in the beforeAll
block. If possible, it would probably be faster and less resource-intensive to create both at the same time. We need to research in the typeorm docs whether this is possible. If so, implement that method in tests/resolvers/Garden.test.ts
so that we can use it as an example for similar contexts.
Bed Columns
In order to add functionality to the individual Bed on the front end, we need a to add a couple of columns to the Bed model on the backend.
- height: number
- width: number
- unitOfMesurement: string
Copy CONTRIBUTING.md from gardenbuilder-backend or gardenbuilder-frontend into this repo, link to README.md
Copy CONTRIBUTING.md
from gardenbuilder-frontend into this repo, update README.md
with link to CONTRIBUTING.md
Add test for getUserIdFromRequest utility
Add test for src/utils/getUserIdFromRequest.ts
Integrate the test:setup-db script to clear out database before each test run
Integrate the test:setup-db
script to clear out database before each test run. Test and ensure everything passes.
Add tests for errorResponse utility
Add tests for src/utils/errorResponse.ts
Change name of testSetup.ts to clearDatabase.ts and write a test for it
Change name of testSetup.ts to clearDatabase.ts and write some tests that ensure it clears out the test database
Add tests for User entity
Add tests for src/entities/User.ts. You can use tests/entities/Bed.test.ts as a model.
Add width, height, and measurement fields to bed entity
Add width, height, and measurement fields to bed entity
- width and height fields should be of type
int
- measurement should be a string, possible values are
cm
andft
Add test for isAuthorized middleware
Add tests for src/middleware/isAuthorized.ts
.
Add Bed resolvers and tests
Add Bed resolvers and tests
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.