
Security News
Google’s OSV Fix Just Added 500+ New Advisories — All Thanks to One Small Policy Change
A data handling bug in OSV.dev caused disputed CVEs to disappear from vulnerability feeds until a recent fix restored over 500 advisories.
fccc-server
Advanced tools
This is the Backend API server for the FCCC software application, it hosts API endpoints, database functionality and other important related features that are needed for the FCCC software application.
You need to create environmental variables to hold specific information that the application will need, you can do this by creating a .env
file in the root project directory. There are also important keys in the .env.sample
file, add these keys in your .env
file and provide adequate values, they are necessary for the application to work.
Install the necessary packages for the application by running the following code in your terminal:
$ npm run install-local
Note : You must install peer dependencies manually, they are found under peerDependencies
in the package.json file.
Knex is an SQL query builder for Node.js and will be used for building MySQL queries in this application, so get that installed by running:
$ npm install knex -g
Create a database manually called betaquick_fccc
.
To migrate the database, run:
npm run migrate
or switch to the db
directory and run:
knex migrate:latest --env development
You also need to seed the database with necessary data:
npm run seed
With that done, your created database should have been populated with necessary data needed by the application. Remember to add the necessary database information such as username, password, host and port into your .env
file.
Start up the application server by running:
$ npm run dev
Make sure you have Docker and Docker-compose installed locally, there are links below on how to setup docker locally depending on your operating system:
When that's done, make sure docker is up and running and then through your terminal navigate to the fccc-server project directory, Run the following commands to build and start the image: To build the image, in your terminal run:
$ docker-compose build
When the image is successfully built, you can start it up by running the following:
$ docker-compose up
db
folder.app/config/routes.js
.app/controllers
and app/services
directories respectively.app/models
directory. This application uses an ORM Objection.js for modelling the DB, Objection.js is built upon the Knex
query builder.The documentation for the API endpoints is generated using Postman and can be found at the following Postman URL. You need to import the collection into your Postman environment to be able to make changes to it. Whenever you add a new endpoint, make sure to update the collection and documentation with the new changes. Also when updating the collection, try to add example responses for each endpoint.
The Mocha library and other packages are used for testing parts of the application, all tests can be found in the test
directory. You can execute tests by running the command below:
$ npm run test-coverage
On MySQL Versions other than 5.7, you may run into an error when trying to migrate or seed the database : ER_TRUNCATED_WRONG_VALUE: Incorrect date value...
Try one or more of the following methods to fix the problem :
Upgrade/downgrade your MySQL version to 5.7
Paste the following code at the bottom of your MySQL config file my.cnf
(my.ini
for windows) : set @@sql_mode='no_engine_substitution';
In your MySQL shell, run the following code:
select @@sql_mode;
SET GLOBAL sql_mode = 'NO_ENGINE_SUBSTITUTION';
SET SESSION sql_mode = 'NO_ENGINE_SUBSTITUTION';
Note : Using this method you may need to run it everytime you restart your MySQL server.
When you pull changes from the remote origin, it is possible that changes/additions have been made to the database tables and seed files, this may cause errors when running the application or when running tests. Such errors can be fixed by migrating your database and seeding it with latest data:
$ npm run migrate
$ npm run seed
Follow this guide to install redis on Windows
FAQs
FCCC Health
We found that fccc-server demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A data handling bug in OSV.dev caused disputed CVEs to disappear from vulnerability feeds until a recent fix restored over 500 advisories.
Research
/Security News
175 malicious npm packages (26k+ downloads) used unpkg CDN to host redirect scripts for a credential-phishing campaign targeting 135+ organizations worldwide.
Security News
Python 3.14 adds template strings, deferred annotations, and subinterpreters, plus free-threaded mode, an experimental JIT, and Sigstore verification.