Skip to content

Instantly share code, notes, and snippets.

View Pholisa-Fatyela's full-sized avatar

Pholisa Fatyela Pholisa-Fatyela

  • Cape Town, South Africa
View GitHub Profile
@Pholisa-Fatyela
Pholisa-Fatyela / MovieApp.md
Last active June 23, 2022 12:49 — forked from Gideon877/MovieApp.md
Movie API with AlpineJS

Movie App

You are a movie lover, and you need to create your our movie app and with no subscriptions.

Create a web application that can help view for all the available movies.

Your app should be able to do the following.

Your app should be able to do the following.:

AlpineJS with ViteJS

  • Create app using Vite

npm vite create@latest

Follow the prompts:

  • Pick vanilla JS

Eslint For VsCode

ESLint is a tool for “linting” your code. It can analyze your code and warn you of potential errors. In order for it to work, you need to configure it with specific rules. Luckily, Standard provides an ESLint configuration that anyone can use.

  1. First we need to install Node.js
  2. Inside your current project. Initialize npm configuration npm init -y
  3. Now enable support for linting common JavaScript features. Past this in your terminal
    • npm i -D eslint eslint-config-standard eslint-plugin-import eslint-plugin-node eslint-plugin-promise eslint-plugin-standard
  4. Now create .eslintrc.js with the following contents
exports.multiply = function (number, cb){
setTimeout(function(){
var result = number * 7;
//console.log( number * 7)
if (number == 6){
return cb("6 is not allowed", null)
}
cb(null, result);
},1000);
}