adopteitor / adopteitor-api Goto Github PK
View Code? Open in Web Editor NEWBackend for adopteitor
License: MIT License
Backend for adopteitor
License: MIT License
Do you think we should maybe tell the app to not try to connect to the DB when only it's running tests via some config option?
Also for error logging like in 404 tests like this:
404
error: Page not found {"type":"FeathersError","name":"NotFound","code":404,"className":"not-found","data":{"url":"/path/to/nowhere"},"errors":{}}
โ shows a 404 HTML page
Or do we plan to test DB connection? In that case we could dockerize it too ๐ณ
Im adding these two services. Both with the same schema:
displayName: {
type: String,
required: true
},
default: {
type: Boolean,
default: false,
required: true
}
``
displayName is the name we will show, for referencing we will use the _id field.
Default will specify wich option will be preselected when creating a new animal.
Description:
Create a Contracts Linking an Animal and a Human.
Parameters:
Todo:
Create Users
const AnimalSchema = new Schema({
stage: { / SHouldn't this be autocalculated based on the dateOfBirth?
type: String,
required: true
},
name: { // Should be displayName?
type: String,
required: true
},
dateOfBirth: {
type: Date,
required: true
},
description: { // A description of the animal.
type: String,
required: true
},
sex: {
type: String,
required: true
},
location: { // A string describing where in the world the animal is located
type: String,
required: false
},
entryDate: {
type: Date,
required: true
}
state: { // Adopted, in adoption, other?
type: String,
required: true
}
});
We must implement a before hook to check if there's another "default" selected, and deselect it before selecting the new one.
Add a new version of docker-compose.yml that does not mount volumes and just runs it.
Animal schema have a photos property, that will contain the path to the uploaded images.
https://github.com/feathersjs/docs/blob/master/guides/advanced/file-uploading.md
The path for this could be something like POST animals/:id/photos
The image should be in the payload, and we need the handler on this route, to save the image in the server and push the path to the corresponding animal photo's array.
We need to authenticate requests and both:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.