create-expo-app
create-expo-stack
create-react-native-app
create-solito-app
create-t3-turbo
create-expo-app
create-expo-stack
create-react-native-app
create-solito-app
create-t3-turbo
import { createClient, RedisClientType, RedisModules, RedisScripts } from '@node-redis/client'; | |
import { getFromCache } from './cache.server'; | |
describe('Name of the group', () => { | |
let client : RedisClientType<RedisModules, RedisScripts>; | |
beforeAll(async () => { | |
client = createClient({ url: process.env.REDIS_URL }); | |
await client.connect(); | |
}); |
class Game { | |
score(scores) { | |
// put your code here | |
} | |
} | |
describe(‘Game’, () => { | |
const subject = new Game(); | |
test(‘when no special scores occur’, () => { |
asd |
asdasdasd |
test |
asd |
I’m using it with a phoenix backend and a create react app front-end.
This requires building the assets and copying to the priv/static folder. Phoenix acts as a giant file server and then I also use it as an api with graphql absinthe.
I make copying to the priv/static folder part of my asset build process package.json build script
“build”: “rescripts build”,
“postbuild”: “mkdirp ../priv/static && cpx \“./build/**\” \“../priv/static\” --clean && cpx \“src/styles/tailwind.css\” \“../priv/static\” “,
# We are changing absithe here so that it expects maps with string keys instead | |
# of maps with atom keys when it resolves :user object | |
# | |
# Out of the box absinthe is optimized for using with something like ecto | |
# that would normally use an ecto schema (which have atom keys). | |
# Instead we are working with api responses and we don't need | |
# the overhead converting our maps to maps with atom keys. | |
def middleware( | |
middleware, | |
%{identifier: identifier} = field, |
ctrl+shift+h
ctrl+shift+l