Giter Club home page Giter Club logo

primesnumbers's Introduction

prime-numbers

implementation of the algorith siege of Eratosthenes, to calculate primes numbers.

is exposed as an api by default in port 3000. If you want to change it create an .env file on the root of the project.

# Set to production when deploying to production
NODE_ENV=development

# Node.js server configuration
SERVER_PORT=8080

to start the project, first do npm install.

then run the following npm run dev to start nodemon

on the browser expose the http://localhost:8080/prime_number/15, the port could change.

It easy generate primes number of 1.000.000 and above.

The project was made with typescript and used mocha and chai for testting.

Development

The project use husky and lint-staged for linting and fixing possible errors on source code before commit

Git hooks scripts are installed after running npm install the first time

npm run dev

run nodemon to watch all changes, by default get an instance of express on port 3000.

npm run build

Compile typescript files from the src folder inside the lib folder

npm run clean

Remove the following directories/files

  • lib
  • esm
  • reports

npm test

Run tests files inside the tests folder that matches the following patterns. Exit with code > 0 on error

  • *.test.ts
  • *.spec.ts

npm run cover

The same as as npm test and generates coverages reports in reports/coverage. Exit with code > 0 on error

npm run lint

Check eslint errors according to .eslintrc

npm run lint:fix

Run npm run lint applying fixes and run prettier on every typescript file

primesnumbers's People

Contributors

makenoisewacamayo avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.