teleren/devto huggingface dataset:
How to create an Axe API from scratch?
Tags: javascript, programming, tutorial, opensource
Published: 2021-11-20 15:50:08

## What is Axe API?

Axe API is the fastest way to create Rest API by defining only database models and relationships between them. It is built on [Knex.js](https://knexjs.org/), and its awesome active records pattern. On the other hand, you have another familiar thing, [Express](https://expressjs.com/).

Axe API provides you the ability to separate your common tasks to build an API from your business logic. Axe API expects model definitions to analyze your routing structure. After you created your models and their relations between them, Axe API can handle all well-known API requests. Creating an API with 5 tables takes almost 15 minutes.

Shortly, Axe API performs three basic functions;

- Analyzes your models and their relationships to create routes.
- Handles all HTTP requests.
- Separate your business logic from API best practices.

## Installation

Using Axe API in an application is very easy. We've created a CLI tool for you; [axe-magic](https://github.com/axe-api/axe-magic)

You can use the following command to install axe-magic to your machine;

```bash
$ npm i -g axe-magic
$ axe-magic --version
1.0.0
```

After that, creating a new project is very easy. Just you can execute the following command;

```bash
$ axe-magic new my-api
```

## Install Dependencies

To install your project's depencies, you can execute the following commands in the root directory;

```bash
$ cd my-api
$ npm install
```

## Serving The App

To serve this application, you can execute the following command;

```bash
$ npm run start:dev
```

> start:dev command use [nodemon](https://www.npmjs.com/package/nodemon). If you haven't installed it yet, we suggest you install it first.

After that, your first Axe API application will be running in [localhost:3000](http://localhost:3000). You will see the following API response if you visit [localhost:3000](http://localhost:3000)

```json
{
  "name": "AXE API",
  "description": "The best API creation tool in the world.",
  "aim": "To kill them all!"
}
```

If you can see that response, it means that your project is running properly. 

## Learn More

If you want to deep dive to Axe API, you can use the following documents;

- [GitHub](https://github.com/axe-api/axe-api)
- [What Is Axe API?](https://axe-api.github.io/getting-started/introduction/#what-is-axe-api)
- [A new approach to create APIs](https://medium.com/geekculture/a-new-approach-to-create-apis-8fe84e158b4c)
PLEASE STOP THIS!!!
Tags: javascript, node, programming
Published: 2021-11-20 15:47:35

PLEASE STOP THIS!!!

Node.js is not a Framework or Programming Language but a runtime environment built on top of Chrome's V8 engine to execute JavaScript outside of the browser, SIMPLE!

I often read articles where the author mentions Node.js as a JavaScript Framework and even compares it with PHP Frameworks, Ruby Frameworks, C# Frameworks, and also with JavaScript frontend frameworks and libraries like Angular, React, and jQuery.

Kindly stop this and don't misguide the people as this is really confusing for beginners who are trying to understand what Node.js is under the hood as Node.js has a lot to offer than just a Web Framework or JavaScript library.

Node.js !== JavaScript in the Browser
Node.js !== JavaScript Framework
Node.js !== JavaScript Library
Node.js !== Programming Language

Node.js === Runtime Environment
Vue 3 and Vite with typescript and tooling
Tags: vuejs, vite, typescript, tooling
Published: 2021-11-20 13:51:45

---
description: How to setup typescript, linting, and prettier in your next Vue and Vite project
---

## Create-vue

See full example on repo: [vue-ts-eslint-template](https://github.com/josip2312/vue-ts-eslint-template).

Use the repo [create-vue](https://github.com/vuejs/create-vue) to get started, this will be the official way to set up a new Vue project with Vite in the future. After running `npm init vue@next` choose the options appropriate for your use case.

### Volar

The first step is to enable the [Volar](https://github.com/johnsoncodehk/volar) extension and disable the [Vetur](https://github.com/vuejs/vetur) extension.
Volar is the new recommended extension to use with Vue 3 and typescript.

### Typescript

If you chose the Typescript option offered by the CLI tool you should be good to go.

> If you run into some issues regarding types try adding the following to your `tsconfig.json`

```json
{
  "compilerOptions": {
    ...
    "types": ["vite/cli"], // add this
  }
}
```

### ESLint

You will need several packages, run the commands below in your terminal:

**ESLint**:

```bash
npm i -D eslint eslint-plugin-vue eslint-config-prettier
```

**Typescript**:

```bash
npm i -D @typescript-eslint/eslint-plugin @typescript-eslint/parser @vue/eslint-config-typescript
```

Next, create a `.eslintrc.js` which will look something like this, can be extended to fit your use case.

```js
module.exports = {
  env: {
    node: true,
  },
  globals: {
    defineProps: "readonly",
    defineEmits: "readonly",
    withDefaults: "readonly",
  },
  extends: [
    "@vue/typescript/recommended",
    "eslint:recommended",
    "plugin:vue/vue3-recommended",
    "prettier",
  ],
};
```

### Prettier

You can add a `.prettierrc.js` with the config that fits your needs.

**Example config**:

```js
module.exports = {
  singleQuote: true,
  trailingComma: "all",
};
```

### Format on commit

Read more about pre-commit hooks [here](https://prettier.io/docs/en/precommit.html).

In your terminal run the command:

```bash
npx mrm@2 lint-staged
```

This will setup a precommit hook with [husky](https://github.com/typicode/husky) and [lint-staged](https://github.com/okonet/lint-staged).

You will see a new entry in your `package.json`

```json
"lint-staged": {
    "*.js": "eslint --cache --fix"
  }
```

You can also easily set up hooks to run on pre-push, learn more about this on the husky and lint-staged repos.

I will adjust the config to be:

```json
"lint-staged": {
    "*.{js,vue}": [
      "prettier --write",
      "eslint --cache --fix"
    ],
    "*.{scss, css, md}": [
      "prettier --write"
    ]
  }
```

So every staged `.js` or `.vue` file gets formatted, then fixed with ESLint.

Every `.css`, `.scss`, and `.md` file will just get formatted.
github-notify-actions
Tags: actionshackathon21
Published: 2021-11-20 14:38:14

[Instructions]: integrate with [lark](https://www.larksuite.com/), [wecom](https://work.weixin.qq.com/), [slack](https://slack.com/), current only support text webhook


### My Workflow
Current only using in my private repo


### Submission Category: 

Maintainer: fatelei
Interesting: open source development


### Yaml File or Link to Code

```yaml
- name: github-notify-action
  # You may pin to the exact commit or the version.
  # uses: fatelei/github-notify-actions@5d5cc6b74d5c8e90ce3ac473ad7ddfb2fee5b350
  uses: fatelei/github-notify-actions@v0.0.3
  with:
    # support lark / wecom / slack
    integration: 
    # webhook url
    webhook: 
    # message type, current only support text
    messageType: 
    # content
    content: 
    # title
    title: # optional, default is 
```
Web Development Resources for Beginners... 😎 
Tags: javascript, webdev, css3, html
Published: 2021-11-20 14:24:16


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a70olx7g41xw2jd1ni4j.png)

One of the popular places to learn web-development with exercises and live editor.
( https://www.w3schools.com/ )

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iqtr2nrzg5sthyw7xu5y.png)

Free Code Camp is a non-profit organization and popular places to learn web-development with exercises and live editor.
( https://www.freecodecamp.org/ )
 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/429j8a0nsn0hzylm2oqb.png)
Code Academy contains both text and video resources to learn web development and programming for free and easy way.
( https://www.codecademy.com/ )
TOTALITY
Published: 2021-11-20 14:16:05

#This is Rei
Hello there, this is Rei, the creator of Totality. I am a Software Engineer of 5 years specialized on Full-Stack development and UI/UX design. I learnt about NFT at October 2021 and stepped myself into this creative space with artists and the NFT community

# NFT Journey - Generating PFP artworks
I started generating PFP artworks as a trial on how generating art works. Starting with generating .PNG layers, metadata, and uploading to Opensea.

The most common issue of generating artworks is that developers usually forget about generating 10k artworks could have duplications of generated artworks with the same metadata.

If you guys want to know how to solve this, hit me up on my Discord: https://discord.com/invite/8KQBeqEXT9

#Learning how to create a minting NFT Dapp with Web3 integration
I learned about creating a Dapp from the Sneaky Vampire Syndicate (SVS) project https://svs.gg/

They had really amazing dev talk channel where the dev and the community of SVS is responsive to my questions.

During the conversations with SVS community I've learnt the following:
1) How to code Smart Contracts
2) How to prevent [Flashbots](https://github.com/flashbots/pm)
3) How to avoid Gas Costs by replacing On-Chain Whitelisting to Off-Chain Whitelisting completely
Things not to forgot while learning coding as a beginner.
Tags: beginners, webdev, javascript, productivity
Published: 2021-11-20 13:42:52

1. **Taking your first tutorial:**
Complete the tutorial. Understand everything, shallow understanding is fine while starting. Write code by yourself even it feels tedious. Do not copy & paste.
You do not need to understand exactly how the functions work internally, but you do need to be able to import and use them correctly.
Don't rush to complete the tutorial. If you feel like skipping any topics from the tutorial, take a break and come back later.
2. **It's ok if you don't understand:** When learning new things, most of the time you might don't understand the stuff, it's ok. You can look that topics from other sources. To become successful you have to cross the difficulties. Just don't runway from it.
3. **Code every day:** To become good at coding you have to code every single day. Even if for just 20 minutes a day. You just have to be consistent.
4. **Add at least 2 new features to the project after completing the tutorial:**
If you have understood the tutorial it will not be a problem. If you don't have any ideas for the features, you can recreate the same project from scratch.
Following the tutorial, you are not using your brain. So, you have to use your brain by creating projects by yourself.
5. **Tutorial Hell**
When you keep on watching tutorials and not building projects by yourself. So, once you feel like you are in a tutorial hell, then stop watching tutorials and start building projects.
6. **Build a new project & complete it:**
Starting a new project is easily but completing is difficult. So, the first thing you have to think of is a project which you are interested in creating. If you are not interested in the project which you are building then you will skip or not complete the project if any difficultly occur during building it.
7. **Maintaining the project:**
If we say building and completing a project is level 1, then maintaining the project is level 2. To become a good developer you should start maintaining your project.
8. **Creating big project:**
When you are done creating 3 or 4 simple projects you can start creating complex projects. For example **simple project 1:** simple todo app, **simple project 2:** simple digital clock, etc. **Complex project:** Todo app with crud functionality,
in next iteration adding reminder functionality, and so on.
Add new features to your project one step at a time. If you keep on adding new features to a simple project, then it will start to grow into a big project.
9. **Habit of Figuring out your problems:** Instead of running away from your challenges, face them. You should ask questions to yourself. How can I solve this problem?
10. **Get good at GIT:** Git is a tool to track or capture the history of your project and help to collaborate with other developers remotely.
11. **Read other people's code:** Read other people's code whose coding level is the same as yours or a little above your level.
12. **Data Structure and Algorithms:** Have at least a basic understanding of different commonly used algorithms.
Best IAS Coaching in Chennai
Published: 2021-11-20 13:42:11

Enroll in the Best IAS Coaching in Chennai and start the preparation for UPSC prelims 2022. UPSC has a vast and huge syllabus and without coaching, no one can crack the exam. If you follow your daily routine according to the management then you can qualify for the exam. Otherwise, every student needs to join the class, because the IAS Coaching Centre in Chennai provides notes and resources which can help you to remember the topic in less time. 
https://officersiasacademy.com/
Release of Perl distribution of Crypt::OpenSSL::PKCS12 1.9
Tags: opensource, release, perl
Published: 2021-11-20 13:05:59

---
title: Release of Perl distribution of Crypt::OpenSSL::PKCS12 1.9
published: true
description: Feature release of Crypt::OpenSSL::PKCS12
tags: opensource, release, perl
//cover_image: https://direct_url_to_image.jpg
--- 
[Crypt::OpenSSL::PKCS12](https://metacpan.org/dist/Crypt-OpenSSL-PKCS12) 1.9 have just been release to CPAN and all open PRs have now been processed.

Additionally I have:

- Ported the change log from text to Markdown
- Added some of the [suggested sections](https://metacpan.org/pod/Perl::Critic::Policy::Documentation::RequirePodSections) to the documentation, some of these will have to be updated with more information
- I have added some more references and documentation and there is more to come in this space
- I have bumped the Perl requirement from 5.6 to 5.8 since the test suite uses UTF-8, `perlver` is indeed a _nifty_ tool, you can use it to [find out what your perl minimum version requirement is](http://jonasbn.github.io/til/perl/find_out_what_your_perl_minimum_version_requirement_is.html)
- Finally I have documented that the distribution is not compatible with OpenSSL 3.X.X only 1.X.X

This concludes this feature release. The next major thing is to make the distrubution compatible with OpenSSL 3.X.X - so there are [plenty of things to do](https://www.openssl.org/docs/man3.0/man7/migration_guide.html).

Thanks to James Rouzier (@jrouzierinverse) for his `create_as_string` feature - your contribution is most welcome

## Change Log

### 1.9 Sat Nov 20 12:49:34 CET 2021

- Added new feature from `create_as_string` via PR #39 from James Rouzier (@jrouzierinverse), which returns the PKCS data as a string, for futher handling

- Bumped Perl requirement from Perl 5.6 to 5.8, due to use of UTF-8 in test suite

- POD cleaned up, more to come
Generate automatically Workflow files
Tags: actionshackathon21, codequality, php, opensource
Published: 2021-11-20 13:00:36

Ghygen is an open source application for generating **GitHub Actions** Workflow files.
It is optimized for generating Workflow for PHP or Laravel applications. It provides two kind of user interface:
- a Web interface where you have a form to fill with the characteristic of your application;
- a CLI, a command for your terminal.

### My Workflow

The command line tool tries to detect some functionalities of your application like:
- PHP versions (from composer.json);
- Dependency stability ( from composer.json);
- Code sniffer (from require-dev);
- Static code analysis tool (from require-dev);
- Static code analysis configuration (for example phpstan.neon)
- Database requirements;
- migrations to execute;
- NodeJS dependencies/version.

Once all of these things are detected the command line, it creates a YAML workflow file - **magically** 🧙‍♂️

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cwak6b3j19p3krwkjyyp.png)






### Submission Category: 

Maintainer Must-Haves


### Yaml File or Link to Code

{% github https://github.com/Hi-Folks/gh-actions-yaml-generator %}



### Additional Resources / Info

Yaml files probably generated using Ghygen: https://github.com/search?l=YAML&q=ghygen&type=Code
IOT and Cloud CMMS - Predictive Plant Maintenance
Published: 2021-11-20 12:55:51

Predictive maintenance is changing the world of manufacturing. Think about it, by understanding what’s happening in a machine before an issue arises, you can save time and money! By combining IoT monitoring with iFactory Cloud CMMS, you can continuously track machine health and on fault detection, your cloud-based software will automatically create maintenance request and notify plant maintenance team who will schedule urgent repairs. Machine uptime increases and across the organization people are more productive because they can spend less time waiting for repairs to happen.

Maintenance software integrated IoT is a smart technology that can help monitoring the condition and vital parameters of machines in real time. It can be used to stream data such as vibration, temperature, pressure and other parameters directly from machines to a cloud-based software platform that aggregates data from multiple sources and provides total visibility from one place. Create Plant maintenance notifications and track the corrective action in iFactory CMMS.

IFactory Cloud CMMS is a cloud-based software platform that helps you manage your maintenance data in a holistic way. The system will create maintenance request as and when required and also manages the repair flow. It will be notified to the maintenance team, who will then go to the machine, schedule the repair work and manage the entire repair process from one place. Take pictures of repair, record voice notes in WO memo and take signatures using mobile app.

What’s more, IFactory Cloud CMMS is powered by robust open APIs which allows integration with other software applications. You can capture data from multiple machines and create maintenance alerts based on engine sensor data. You can also send out alerts of specific issues for each machine to other systems such as remote monitoring system (RMS). With this, you’ll be able to connect with your suppliers for granular maintenance analytics. All this will help you improve the effectiveness of your maintenance procedures and generate new knowledge for your organization.
Learning Rust Offline
Tags: rust, beginners
Published: 2021-11-20 12:55:24

I would be on a 13 hour flight and I look for some good offline resources to learn `rust`:

#### The Rust Programming Language
This is THE first book to rust. If you already have `rustup` installed on your laptop, you can read the book from your browser offline pretty easily

```
rustup doc --book
```

#### Rust by example
While the first book gives you lots of background and theory, this book gives you some more examples for some common tasks that can get you started. The github page gives you instruction to use `mdbook`, which allows you to read the book offline.
- [rust-by-example](https://github.com/rust-lang/rust-by-example)

#### Rust Cookbook
I found this book really practical. It has some example, say to connect to a database, manipulating datetime, which are very common things you need to deal with at work. Again, blessed by `mdbook`, you can read it offline too!
- [rust cookbook ](https://github.com/rust-lang-nursery/rust-cookbook)

#### Async Rust
Another common task you will come across a lot at work is parallelism. The textbook way to handle it is threading. but for small/simple task (eg downloading files from web), async may be a better choice since it consume less resources. This book gives a good walk through of this feature in rust. Of course, it can be read offline with `mdbook` !
- [Rust Async](https://github.com/rust-lang/async-book)



So thats it! If you are also preparing for your flight ✈️, I wish you a safe journey!
Learning Programming is Non-Linear
Tags: beginners, codenewbie, python, javascript
Published: 2021-11-20 12:28:14

Learning is by no means a linear process, even in hard sciences like Math.

It is very common to see people asking in groups, Reddit, and other forum-like places "What path should I take to become a Software Developer".

Unfortunately, learning programming is not linear.

You will find many lists and articles giving you a path like: learn HTML, CSS, JavaScript...

They are not wrong in the sense that you should learn JavaScript before React, but they don't warn you that you should not worry about mastering the previous topic before jumping to the next.

Those topics are all interconnected, which means they will "click" in your head only after you have some knowledge of each topic.

Learn some JavaScript and then some React.

If you decide to "master" Python before trying Django, good luck, you will never get to Django.

Python is a massive language, you can learn the basics very quickly, but mastering it is another matter.

That is what I had in mind when I wrote [The Python Guide for Beginners](https://renanmf.com/python-guide-beginners/).

You can learn the core of the language as fast as possible, and then move on to dive into Web Development, Data Science, or general use of Python as a programming language to automate your everyday tasks.

If you choose, say, Machine Learning, you will need to understand some details of the language specifically for some tasks, but you will have enough knowledge of the basics to google yourself out of any situation.

The "click" also happens as you expand your arsenal of tools.

[Learn More Than One Programming Language](https://renanmf.com/learn-more-than-one-programming-language/) and some concepts that you learned in language X will make much more sense after you learn language Y.

I'm challenging myself at the moment to dive more into web3, which is a new realm of software development and solutions revolving around blockchain and the crypto space.

Adaptation is [The Top Skill for a Software Developer](https://renanmf.com/the-top-skill-for-a-software-developer/) and you have to keep improving yourself as new opportunities arise.

This means I won't waste hundreds of hours to learn Solidity or understand every single concept about Smart Contracts.

[The Only Way To Learn Programming](https://renanmf.com/the-only-way-to-learn-programming/) is to take action with what you know.

So I will learn some things, apply them to a project and then I will be able to adapt myself to any situation that comes to me.

If you wait until you are 100% prepared, you will be already too late to take the best opportunities.

You also can [subscribe to my newsletter](https://renanmf.com/newsletter/).