Tesla forum database and RESTful API
- clone the repo
- start mongo
- cd into repository directory
- run
npm install
- run
node api.js
The yay API is now running on port 3000.
Tesla forum database and RESTful API
Tesla forum database and RESTful API
npm install
node api.js
The yay API is now running on port 3000.
set the thread _id as an index on the comment table, remove the array from the Thread model, alter endpoints accordingly
this will fix an issue where very large threads slow down queries that select them
and use the current if not set
applying sorting to getThreads increases query time by 100-200% on large collections (million+ comments). Adding an index helps but we should optimise this for at least the default sorting (last comment time).
use AOP / mongoose middleware to hook it into the post of a save operation
is the main bottleneck on threads calls now, move this to a separate record and manage it with the application?
This is 2013. Use SHA-2, PBKDF2, etc... Use an individual salt for each password!
holding the cache in memory means it needs to be cleaned regularly, may as well store the cache in a mongo collection and never have it expire
Possibly:
/user/:username/profile
don't think we'll need a summary version. Needs to return all the info required for the user profile page, and I guess we should strip out participated, favourites etc from the user document to cut down on the returned JSON size.
in https://github.com/cham/TeslaAPI/blob/master/src/db/db.js
instead of localhost, use process.env.mongoHost
and so on for username/pw/port
The API server should have these env variables configured during provisioning
MongoDB should eventually be hosted on its own server/vm/container
This way you can scale to multiple API servers since the db server is not hosted locally
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.