generaptr / generaptr Goto Github PK
View Code? Open in Web Editor NEWGeneraptr is a node package that helps when starting up a project by generating boilerplate code for Express api.
Home Page: https://generaptr.github.io
License: MIT License
Generaptr is a node package that helps when starting up a project by generating boilerplate code for Express api.
Home Page: https://generaptr.github.io
License: MIT License
To see what happens to your code in Node.js 10, Greenkeeper has created a branch with the following changes:
.travis.yml
package.json
files, so that was left aloneIf you’re interested in upgrading this repo to Node.js 10, you can open a PR with these changes. Please note that this issue is just intended as a friendly reminder and the PR as a possible starting point for getting your code running on Node.js 10.
Greenkeeper has checked the engines
key in any package.json
file, the .nvmrc
file, and the .travis.yml
file, if present.
engines
was only updated if it defined a single version, not a range..nvmrc
was updated to Node.js 10.travis.yml
was only changed if there was a root-level node_js
that didn’t already include Node.js 10, such as node
or lts/*
. In this case, the new version was appended to the list. We didn’t touch job or matrix configurations because these tend to be quite specific and complex, and it’s difficult to infer what the intentions were.For many simpler .travis.yml
configurations, this PR should suffice as-is, but depending on what you’re doing it may require additional work or may not be applicable at all. We’re also aware that you may have good reasons to not update to Node.js 10, which is why this was sent as an issue and not a pull request. Feel free to delete it without comment, I’m a humble robot and won’t feel rejected 🤖
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Move the app to docker infrastructure.
Add infrastructure to test the api.
In the scope of this issue, we need to research how and if possible to read the "schema" of database based on the datasets in each collection. For example what we do for MySql right now, after some parsing looks somewhere on the lines of this.
Progress in #27-test-everything
I think we should probably separate the logic in generaptr in a separate package, and the cli which will use the core generaptr in another, this way we will have a bit more separation, and would make the testing a lot easier.
@StefanBalea What do you think?
Since #40 we moved to typescript and in the rush of finishing that we added types for the commonly used data structures in the project such as DataType, Column, Table, Schema etc... I was wondering if we shouldn't move to a more OOP approach and declare those as models and in doing so we can move some of the logic from utils classes to the models itself.
I think it would simplify the overhead a bit when working with the handlers and processors and with the actual generation of the code.
add at least support for test and prod envs.
Use semantic-release and commitizen to standardise pushes to the repo
Document the purpose of the repository.
add boilerplate's for express server, config, controllers and services
What database should we support?
generaptr should be able to read a valid raml and extract the api schema
Add some kind of static type checking on generaptr codebase either by moving to typescript or adding flow.
Research:
Generate sequelize models and repositories based on the schema
As seen on Sequelize Docs, Sequelize supports PostgreSQL, MySQL, SQLite and MSSQL which would already cover a good part of the relational databases.
We should refactor some file names, for example we don't need all files inside commons/utils to have the Util appended to their name, it can clearly be seen from the import that it's a util class.
The same goes for fileOperations, handlers and preprocessors.
We should support enum and datatypes especially if we want to support no-sql databases.
Mysql supports enum which look something like this
size ENUM('x-small', 'small', 'medium', 'large', 'x-large')
A list of previously defined items from which the field can have one as value.
https://github.com/raml-org/raml-spec/blob/master/versions/raml-10/raml-10.md
Research reading schema for other sql databases.
Maybe we can use something like faker.js to generate some dummy responses.
To keep in line with the current node js versions, move the generated API code from Promises to Async / Await.
When the foreign key column name differs from the referenced table, generaptr detects the datatype wrong.
Examples:
user_id
foreign key to users table results in a User
datatype which is right
created_by
foreign key to users table results in a Created_by
datatype which is wrong, it should've been User
Progress:
When given a complete schema and an array of required entities, generaptr should be able to filter out unneeded models and related columns form schema.
References issue #5 in generaptr-cli
mysql2 was launched and brings a boost in performance in interacting with mysql databases over mysql-node package.
See mysql2
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.